/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// identity function for calling harmony imports with the correct context
/******/ 	__webpack_require__.i = function(value) { return value; };
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 34);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

var store      = __webpack_require__(27)('wks')
  , uid        = __webpack_require__(30)
  , Symbol     = __webpack_require__(1).Symbol
  , USE_SYMBOL = typeof Symbol == 'function';

var $exports = module.exports = function(name){
  return store[name] || (store[name] =
    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};

$exports.store = store;

/***/ }),
/* 1 */
/***/ (function(module, exports) {

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
  ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef

/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(10);
module.exports = function(it){
  if(!isObject(it))throw TypeError(it + ' is not an object!');
  return it;
};

/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

var dP         = __webpack_require__(11)
  , createDesc = __webpack_require__(26);
module.exports = __webpack_require__(5) ? function(object, key, value){
  return dP.f(object, key, createDesc(1, value));
} : function(object, key, value){
  object[key] = value;
  return object;
};

/***/ }),
/* 4 */
/***/ (function(module, exports) {

var core = module.exports = {version: '2.4.0'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef

/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(22)(function(){
  return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});

/***/ }),
/* 6 */
/***/ (function(module, exports) {

module.exports = {};

/***/ }),
/* 7 */
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function(it){
  return toString.call(it).slice(8, -1);
};

/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {

// optional / simple context binding
var aFunction = __webpack_require__(12);
module.exports = function(fn, that, length){
  aFunction(fn);
  if(that === undefined)return fn;
  switch(length){
    case 1: return function(a){
      return fn.call(that, a);
    };
    case 2: return function(a, b){
      return fn.call(that, a, b);
    };
    case 3: return function(a, b, c){
      return fn.call(that, a, b, c);
    };
  }
  return function(/* ...args */){
    return fn.apply(that, arguments);
  };
};

/***/ }),
/* 9 */
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key){
  return hasOwnProperty.call(it, key);
};

/***/ }),
/* 10 */
/***/ (function(module, exports) {

module.exports = function(it){
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};

/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

var anObject       = __webpack_require__(2)
  , IE8_DOM_DEFINE = __webpack_require__(41)
  , toPrimitive    = __webpack_require__(62)
  , dP             = Object.defineProperty;

exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes){
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if(IE8_DOM_DEFINE)try {
    return dP(O, P, Attributes);
  } catch(e){ /* empty */ }
  if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
  if('value' in Attributes)O[P] = Attributes.value;
  return O;
};

/***/ }),
/* 12 */
/***/ (function(module, exports) {

module.exports = function(it){
  if(typeof it != 'function')throw TypeError(it + ' is not a function!');
  return it;
};

/***/ }),
/* 13 */
/***/ (function(module, exports) {

// 7.2.1 RequireObjectCoercible(argument)
module.exports = function(it){
  if(it == undefined)throw TypeError("Can't call method on  " + it);
  return it;
};

/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(10)
  , document = __webpack_require__(1).document
  // in old IE typeof document.createElement is 'object'
  , is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
  return is ? document.createElement(it) : {};
};

/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

var def = __webpack_require__(11).f
  , has = __webpack_require__(9)
  , TAG = __webpack_require__(0)('toStringTag');

module.exports = function(it, tag, stat){
  if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
};

/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__(27)('keys')
  , uid    = __webpack_require__(30);
module.exports = function(key){
  return shared[key] || (shared[key] = uid(key));
};

/***/ }),
/* 17 */
/***/ (function(module, exports) {

// 7.1.4 ToInteger
var ceil  = Math.ceil
  , floor = Math.floor;
module.exports = function(it){
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};

/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {

// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(43)
  , defined = __webpack_require__(13);
module.exports = function(it){
  return IObject(defined(it));
};

/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {

// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(7)
  , TAG = __webpack_require__(0)('toStringTag')
  // ES3 wrong here
  , ARG = cof(function(){ return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function(it, key){
  try {
    return it[key];
  } catch(e){ /* empty */ }
};

module.exports = function(it){
  var O, T, B;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
    // builtinTag case
    : ARG ? cof(O)
    // ES3 arguments fallback
    : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};

/***/ }),
/* 20 */
/***/ (function(module, exports) {

// IE 8- don't enum bug keys
module.exports = (
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');

/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {

var global    = __webpack_require__(1)
  , core      = __webpack_require__(4)
  , ctx       = __webpack_require__(8)
  , hide      = __webpack_require__(3)
  , PROTOTYPE = 'prototype';

var $export = function(type, name, source){
  var IS_FORCED = type & $export.F
    , IS_GLOBAL = type & $export.G
    , IS_STATIC = type & $export.S
    , IS_PROTO  = type & $export.P
    , IS_BIND   = type & $export.B
    , IS_WRAP   = type & $export.W
    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})
    , expProto  = exports[PROTOTYPE]
    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
    , key, own, out;
  if(IS_GLOBAL)source = name;
  for(key in source){
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    if(own && key in exports)continue;
    // export native or passed
    out = own ? target[key] : source[key];
    // prevent global pollution for namespaces
    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
    // bind timers to global for call from export context
    : IS_BIND && own ? ctx(out, global)
    // wrap global constructors for prevent change them in library
    : IS_WRAP && target[key] == out ? (function(C){
      var F = function(a, b, c){
        if(this instanceof C){
          switch(arguments.length){
            case 0: return new C;
            case 1: return new C(a);
            case 2: return new C(a, b);
          } return new C(a, b, c);
        } return C.apply(this, arguments);
      };
      F[PROTOTYPE] = C[PROTOTYPE];
      return F;
    // make static versions for prototype methods
    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
    if(IS_PROTO){
      (exports.virtual || (exports.virtual = {}))[key] = out;
      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
      if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
    }
  }
};
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library` 
module.exports = $export;

/***/ }),
/* 22 */
/***/ (function(module, exports) {

module.exports = function(exec){
  try {
    return !!exec();
  } catch(e){
    return true;
  }
};

/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(1).document && document.documentElement;

/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var LIBRARY        = __webpack_require__(25)
  , $export        = __webpack_require__(21)
  , redefine       = __webpack_require__(56)
  , hide           = __webpack_require__(3)
  , has            = __webpack_require__(9)
  , Iterators      = __webpack_require__(6)
  , $iterCreate    = __webpack_require__(46)
  , setToStringTag = __webpack_require__(15)
  , getPrototypeOf = __webpack_require__(52)
  , ITERATOR       = __webpack_require__(0)('iterator')
  , BUGGY          = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
  , FF_ITERATOR    = '@@iterator'
  , KEYS           = 'keys'
  , VALUES         = 'values';

var returnThis = function(){ return this; };

module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
  $iterCreate(Constructor, NAME, next);
  var getMethod = function(kind){
    if(!BUGGY && kind in proto)return proto[kind];
    switch(kind){
      case KEYS: return function keys(){ return new Constructor(this, kind); };
      case VALUES: return function values(){ return new Constructor(this, kind); };
    } return function entries(){ return new Constructor(this, kind); };
  };
  var TAG        = NAME + ' Iterator'
    , DEF_VALUES = DEFAULT == VALUES
    , VALUES_BUG = false
    , proto      = Base.prototype
    , $native    = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
    , $default   = $native || getMethod(DEFAULT)
    , $entries   = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
    , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
    , methods, key, IteratorPrototype;
  // Fix native
  if($anyNative){
    IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
    if(IteratorPrototype !== Object.prototype){
      // Set @@toStringTag to native iterators
      setToStringTag(IteratorPrototype, TAG, true);
      // fix for some old engines
      if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
    }
  }
  // fix Array#{values, @@iterator}.name in V8 / FF
  if(DEF_VALUES && $native && $native.name !== VALUES){
    VALUES_BUG = true;
    $default = function values(){ return $native.call(this); };
  }
  // Define iterator
  if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
    hide(proto, ITERATOR, $default);
  }
  // Plug for library
  Iterators[NAME] = $default;
  Iterators[TAG]  = returnThis;
  if(DEFAULT){
    methods = {
      values:  DEF_VALUES ? $default : getMethod(VALUES),
      keys:    IS_SET     ? $default : getMethod(KEYS),
      entries: $entries
    };
    if(FORCED)for(key in methods){
      if(!(key in proto))redefine(proto, key, methods[key]);
    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  }
  return methods;
};

/***/ }),
/* 25 */
/***/ (function(module, exports) {

module.exports = true;

/***/ }),
/* 26 */
/***/ (function(module, exports) {

module.exports = function(bitmap, value){
  return {
    enumerable  : !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable    : !(bitmap & 4),
    value       : value
  };
};

/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(1)
  , SHARED = '__core-js_shared__'
  , store  = global[SHARED] || (global[SHARED] = {});
module.exports = function(key){
  return store[key] || (store[key] = {});
};

/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {

var ctx                = __webpack_require__(8)
  , invoke             = __webpack_require__(42)
  , html               = __webpack_require__(23)
  , cel                = __webpack_require__(14)
  , global             = __webpack_require__(1)
  , process            = global.process
  , setTask            = global.setImmediate
  , clearTask          = global.clearImmediate
  , MessageChannel     = global.MessageChannel
  , counter            = 0
  , queue              = {}
  , ONREADYSTATECHANGE = 'onreadystatechange'
  , defer, channel, port;
var run = function(){
  var id = +this;
  if(queue.hasOwnProperty(id)){
    var fn = queue[id];
    delete queue[id];
    fn();
  }
};
var listener = function(event){
  run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if(!setTask || !clearTask){
  setTask = function setImmediate(fn){
    var args = [], i = 1;
    while(arguments.length > i)args.push(arguments[i++]);
    queue[++counter] = function(){
      invoke(typeof fn == 'function' ? fn : Function(fn), args);
    };
    defer(counter);
    return counter;
  };
  clearTask = function clearImmediate(id){
    delete queue[id];
  };
  // Node.js 0.8-
  if(__webpack_require__(7)(process) == 'process'){
    defer = function(id){
      process.nextTick(ctx(run, id, 1));
    };
  // Browsers with MessageChannel, includes WebWorkers
  } else if(MessageChannel){
    channel = new MessageChannel;
    port    = channel.port2;
    channel.port1.onmessage = listener;
    defer = ctx(port.postMessage, port, 1);
  // Browsers with postMessage, skip WebWorkers
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
    defer = function(id){
      global.postMessage(id + '', '*');
    };
    global.addEventListener('message', listener, false);
  // IE8-
  } else if(ONREADYSTATECHANGE in cel('script')){
    defer = function(id){
      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
        html.removeChild(this);
        run.call(id);
      };
    };
  // Rest old browsers
  } else {
    defer = function(id){
      setTimeout(ctx(run, id, 1), 0);
    };
  }
}
module.exports = {
  set:   setTask,
  clear: clearTask
};

/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.15 ToLength
var toInteger = __webpack_require__(17)
  , min       = Math.min;
module.exports = function(it){
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};

/***/ }),
/* 30 */
/***/ (function(module, exports) {

var id = 0
  , px = Math.random();
module.exports = function(key){
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};

/***/ }),
/* 31 */
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
	// This works if the window reference is available
	if(typeof window === "object")
		g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _promise = __webpack_require__(35);

var _promise2 = _interopRequireDefault(_promise);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function (fn) {
  return function () {
    var gen = fn.apply(this, arguments);
    return new _promise2.default(function (resolve, reject) {
      function step(key, arg) {
        try {
          var info = gen[key](arg);
          var value = info.value;
        } catch (error) {
          reject(error);
          return;
        }

        if (info.done) {
          resolve(value);
        } else {
          return _promise2.default.resolve(value).then(function (value) {
            step("next", value);
          }, function (err) {
            step("throw", err);
          });
        }
      }

      return step("next");
    });
  };
};

/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(69);


/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _regenerator = __webpack_require__(33);

var _regenerator2 = _interopRequireDefault(_regenerator);

var _asyncToGenerator2 = __webpack_require__(32);

var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);

var getRequest = function () {
    var _ref21 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee22(code, type, callback) {
        var quote, req;
        return _regenerator2.default.wrap(function _callee22$(_context22) {
            while (1) {
                switch (_context22.prev = _context22.next) {
                    case 0:
                        quote = new ThsQuote();
                        req = {
                            code: code,
                            type: type,
                            onready: function () {
                                var _ref22 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee21() {
                                    var ret, data;
                                    return _regenerator2.default.wrap(function _callee21$(_context21) {
                                        while (1) {
                                            switch (_context21.prev = _context21.next) {
                                                case 0:
                                                    ret = {
                                                        code: code,
                                                        type: type
                                                    };
                                                    _context21.next = 3;
                                                    return quote.getData(ret);

                                                case 3:
                                                    data = _context21.sent;

                                                    data = eval(data);
                                                    callback(data);

                                                case 6:
                                                case 'end':
                                                    return _context21.stop();
                                            }
                                        }
                                    }, _callee21, this);
                                }));

                                function onready() {
                                    return _ref22.apply(this, arguments);
                                }

                                return onready;
                            }()
                        };
                        _context22.next = 4;
                        return quote.request(req);

                    case 4:
                    case 'end':
                        return _context22.stop();
                }
            }
        }, _callee22, this);
    }));

    return function getRequest(_x3, _x4, _x5) {
        return _ref21.apply(this, arguments);
    };
}();

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

//@charset "utf-8"
var reloadDelN = false;
var NewNumber = 0;
/*显示我的预警结果*/
String.prototype.replaceAll = function (strFrom, strTo) {
    return this.replace(new RegExp(strFrom, 'gm'), strTo);
};
//TabClick 实现tab切换刷新当前页面
var TabClick0 = getUrlParam('TabClick');
var TabClicks = 0;
//alert(location.href);
var taburl = window.location.href.replaceAll('#', '');
var value = taburl.match(new RegExp("[\?\&]TabClicks=([^\&]*)(\&?)", "i"));
var tabC = value ? value[1] : value;
$((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3() {
    var isInteger, clientInterface, txtstr, heightnew, data, dataCF, subscribeData, nScrollHights, nScrollTops, nDivHights, x, subarr, length, renderD, num, pages, utils, readWs, M, N, YM, subresultDataStr, readWAll, nScrollHight, nScrollTop, nDivHight, subresultData, readW, readNumber, j;
    return _regenerator2.default.wrap(function _callee3$(_context3) {
        while (1) {
            switch (_context3.prev = _context3.next) {
                case 0:
                    renderD = function renderD(length, subarr) {
                        if (length != 0) {
                            $(".pro-text-null").hide();
                            $(".listli0 i").css('visibility', 'visible');
                            for (var i = 0; i < length; i++) {
                                var codeh = subarr[i]['datainfo']['stockcode'];
                                var codev = subarr[i]['datainfo']['value'];
                                var modes = subarr[i]['datainfo']['mode'];
                                var market = subarr[i]['datainfo']['market'];
                                var temp = subarr[i]['datainfo']['templates'];
                                var aaa = subarr[i]['datainfo']['comment'];
                                var arrmode = subarr[i]['datainfo']['mode'].split(",");
                                //var arrmode = [0,1,0,0,'alert',0];
                                var alerts;
                                if (arrmode[4] == 'alert') {
                                    alerts = '警报';
                                }
                                if (arrmode[4] == 'up') {
                                    alerts = '向上';
                                }
                                if (arrmode[4] == '清脆') {
                                    alerts = '清脆';
                                }
                                var state;
                                var stateid;
                                var arrmodes = new Array();
                                // mode.push($("#keep_monitor").hasClass("c-on") ? 1 : 0);
                                arrmodes.push(arrmode[0] == 0 ? '' : '持续监控');
                                arrmodes.push(arrmode[1] == 0 ? '' : '弹框');
                                arrmodes.push(arrmode[2] == 0 ? '' : alerts);
                                //COCO新增集合竞价
                                arrmodes.push(arrmode[6] == 0 ? '' : '集合竞价');

                                if (temp == 'j') {
                                    arrmodes.push(arrmode[5] == 1 ? '' : '');
                                    if (arrmode[0] == 0 && arrmode[1] == 0 && arrmode[2] == 0 && arrmode[6] == 0 && arrmode[5] == 1) {
                                        arrmodes = '--';
                                    } else {
                                        arrmodes = $.grep(arrmodes, function (n) {
                                            return $.trim(n).length > 0;
                                        });
                                        arrmodes = arrmodes.join('+');
                                    }
                                } else {
                                    arrmodes.push(arrmode[5] == 1 ? '手机程序' : '');
                                    if (arrmode[0] == 0 && arrmode[1] == 0 && arrmode[2] == 0 && arrmode[6] == 0 && arrmode[5] == 0) {
                                        arrmodes = '--';
                                    } else {
                                        arrmodes = $.grep(arrmodes, function (n) {
                                            return $.trim(n).length > 0;
                                        });
                                        arrmodes = arrmodes.join('+');
                                    }
                                }

                                if (arrmode[3] == 0) {
                                    state = '已关闭';
                                    stateid = 0;
                                } else if (arrmode[3] == 1) {
                                    state = '运行中';
                                    stateid = 1;
                                }

                                $("#proTableMy table").append('<tr class="Y_bg" pcid="' + subarr[i]['pcid'] + '" mobileid="' + subarr[i]['mobileid'] + '" buildtime="' + subarr[i]['buildtime'] + '" Key="' + i + '" stockcode="' + subarr[i]['datainfo']['stockcode'] + '" market="' + subarr[i]['datainfo']['market'] + '" templates="' + subarr[i]['datainfo']['templates'] + '" value="' + subarr[i]['datainfo']['value'] + '" arrmode = "' + subarr[i]['datainfo']['mode'] + '" modehtml = "' + arrmodes + '" stockname = "' + subarr[i]['datainfo']['stockname'] + '"  state="' + stateid + '"><td><i class="btn"></i>' + subarr[i]['datainfo']['stockcode'] + mCutStr(subarr[i]['datainfo']['stockname'], 12, '..') + '</td><td>' + aaa + '</td><td class="tdl-c">' + mCutStr(arrmodes, 19, '.') + '</td><td class="state">' + state + '</td><td><a href="###" class="g-revise">修改</a><a href="###" class="g-delete">删除</a></td></tr><tr class="F_bg" pcid="' + subarr[i]['pcid'] + '" mobileid="' + subarr[i]['mobileid'] + '" buildtime="' + subarr[i]['buildtime'] + '" templates="' + subarr[i]['datainfo']['templates'] + '"><td>&nbsp;</td><td><div class="Tip_wrap"><i class="Tip_c c-on"></i><input type="text" param = "' + subarr[i]['datainfo']['templates'] + '" onkeyup="clearNoNum(this)" maxlength="7" class="yj_price" vals = "' + subarr[i]['datainfo']['value'] + '" value="' + subarr[i]['datainfo']['value'] + '" /><em class="list_tips" view_valid_msg=""></em></div></td><td class="tdl-c"><span class="yj_mode" arrmode_m= "' + subarr[i]['datainfo']['mode'] + '"></span></td><td colspan="2" class="tdl-l save-r"><a href="###" class="btn yj_save">完成</a><a href="###" class="btn yj_cancel">取消</a></td></tr>');
                            }
                            $("#proTableMy table tr").eq(0).addClass("tr-click");
                            checkBox();
                        }
                    };

                    isInteger = function isInteger(obj) {
                        return obj % 1 === 0;
                    };

                    //获取f5刷新
                    document.onkeydown = function (e) {
                        var ev = window.event || e;
                        var code = ev.keyCode || ev.which;
                        if (code == 116) {
                            /*var UrlCurrent = window.location.href.split('?');
                            var urls = UrlCurrent[0] + '?TabClicks=' + TabClicks;
                            //alert(urls);
                            window.location.href = urls;*/
                            event.keyCode = 0;
                            event.cancelBubble = true;
                            return false;
                        }
                    };

                    //窗口大小
                    clientInterface = new ComClientInterface();
                    _context3.next = 6;
                    return clientInterface.getFileContent('gpyj.txt');

                case 6:
                    txtstr = _context3.sent;

                    if (txtstr === false) {
                        clientInterface.modifyWindowsSize('652', '399', 'Center');
                    } else {
                        if ($.browser.msie && $.browser.version == "6.0" && !$.support.style) {
                            clientInterface.modifyWindowsSize('652', txtstr + 61, 'Center');
                            heightnew = parseFloat(txtstr);
                            $('.pro-table').css('height', heightnew - 76);
                            $('.pro-result-list, .my-pro-list').css('height', heightnew - 48);
                        } else {
                            clientInterface.modifyWindowsSize('652', txtstr + 33, 'Center');
                            heightnew = parseFloat(txtstr);
                            $('.pro-table').css('height', heightnew - 106);
                            $('.pro-result-list, .my-pro-list').css('height', heightnew - 76);
                        }
                        $('.pro-text-null, .pro-result-null').css('height', heightnew - 76);
                        $('.pro-text-null p, .pro-result-null p').css('padding-top', heightnew - 240);
                    }

                    _context3.next = 10;
                    return clientInterface.getSubData();

                case 10:
                    subscribeDataStr = _context3.sent;
                    dataCF = new Array();

                    if (subscribeDataStr == null || subscribeDataStr.length == 0) {
                        $("#proTableMy").hide();
                        $(".pro-text-null").show();
                        $(".listli0 i").css('visibility', 'hidden');
                    } else {
                        //数组翻转reverse()
                        subscribeData = eval("data=" + subscribeDataStr).reverse();
                        nScrollHights = 0; //滚动距离总长(注意不是滚动条的长度)

                        nScrollTops = 0; //滚动到的当前位置

                        nDivHights = $("#proTableMy").height();
                        //alert(nDivHights);

                        x = 0;

                        if (subscribeData.length > 10) {
                            subarr = subscribeData.slice(x * 10, (x + 1) * 10);
                            length = subarr.length;

                            renderD(length, subarr);
                            if (nDivHights > 300) {

                                setInterval(function () {
                                    if (nScrollTops + nDivHights >= nScrollHights) {
                                        x = x + 1;
                                        var subarr = subscribeData.slice(x * 10, (x + 1) * 10);
                                        var length = subarr.length;
                                        renderD(length, subarr);
                                    }
                                }, '1000');
                            } else {
                                $("#proTableMy").scroll(function () {
                                    nScrollHights = $(this)[0].scrollHeight;
                                    nScrollTops = $(this)[0].scrollTop;

                                    if (nScrollTops + nDivHights >= nScrollHights) {

                                        x = x + 1;
                                        var subarr = subscribeData.slice(x * 10, (x + 1) * 10);
                                        var length = subarr.length;
                                        renderD(length, subarr);
                                    }
                                });
                            }
                        } else {
                            length = subscribeData.length;

                            renderD(length, subscribeData);
                        }
                    }
                    num = 1;
                    pages = 10;
                    utils = new ThsUtil();
                    _context3.next = 18;
                    return clientInterface.getAlertResultCount();

                case 18:
                    readWs = _context3.sent;

                    // alert(readWs + 'a');
                    M = readWs - pages;
                    N = readWs;
                    YM = isInteger(readWs / pages);
                    _context3.next = 24;
                    return utils.getAlertResult({
                        'start': M,
                        'end': N
                    });

                case 24:
                    subresultDataStr = _context3.sent;
                    _context3.next = 27;
                    return utils.getAlertResult();

                case 27:
                    readWAll = _context3.sent;

                    // alert('all'+readWAll);
                    // alert('sss' + subresultDataStr);
                    // alert(readWAll);
                    nScrollHight = 0; //滚动距离总长(注意不是滚动条的长度)

                    nScrollTop = 0; //滚动到的当前位置

                    nDivHight = $("#proTableResult").height();

                    if (nDivHight > 300) {
                        setInterval((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() {
                            var j, subresultDataStr, subresultData;
                            return _regenerator2.default.wrap(function _callee$(_context) {
                                while (1) {
                                    switch (_context.prev = _context.next) {
                                        case 0:
                                            j = 10;

                                            if (!(nScrollTop + nDivHight >= nScrollHight)) {
                                                _context.next = 13;
                                                break;
                                            }

                                            j = j + 1;
                                            num = num + j;
                                            if (num >= 12 && num < 13) {
                                                num = num - 1;
                                            }

                                            if (!(N > 9)) {
                                                _context.next = 13;
                                                break;
                                            }

                                            M = M - pages - 1;
                                            N = N - pages - 1;
                                            _context.next = 10;
                                            return utils.getAlertResult({
                                                'start': M,
                                                'end': N
                                            });

                                        case 10:
                                            subresultDataStr = _context.sent;
                                            subresultData = eval('data=' + subresultDataStr);

                                            ListResultData(M, N, subresultData, tabC, TabClicks, TabClick0, num);

                                        case 13:
                                        case 'end':
                                            return _context.stop();
                                    }
                                }
                            }, _callee, this);
                        })), '1000');
                    } else {
                        $("#proTableResult").scroll((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2() {
                            var j, subresultDataStr, subresultData;
                            return _regenerator2.default.wrap(function _callee2$(_context2) {
                                while (1) {
                                    switch (_context2.prev = _context2.next) {
                                        case 0:
                                            nScrollHight = $(this)[0].scrollHeight;
                                            nScrollTop = $(this)[0].scrollTop;
                                            j = 10;

                                            if (!(nScrollTop + nDivHight >= nScrollHight)) {
                                                _context2.next = 15;
                                                break;
                                            }

                                            j = j + 1;
                                            num = num + j;
                                            if (num >= 12 && num < 13) {
                                                num = num - 1;
                                            }

                                            if (!(N > 9)) {
                                                _context2.next = 15;
                                                break;
                                            }

                                            M = M - pages - 1;
                                            N = N - pages - 1;
                                            _context2.next = 12;
                                            return utils.getAlertResult({
                                                'start': M,
                                                'end': N
                                            });

                                        case 12:
                                            subresultDataStr = _context2.sent;
                                            subresultData = eval('data=' + subresultDataStr);

                                            ListResultData(M, N, subresultData, tabC, TabClicks, TabClick0, num);

                                        case 15:
                                        case 'end':
                                            return _context2.stop();
                                    }
                                }
                            }, _callee2, this);
                        })));
                    }

                    if (readWAll == null || readWAll.length == 0) {
                        $("#proTableResult").hide();
                        $(".pro-result-null").show();
                        $(".read-all").css("cursor", "default");
                        $(".look-pro-on").show();
                        $(".look-pro").hide();
                    } else {
                        $(".read-all").css("cursor", "pointer");
                        $(".look-pro-on").hide();
                        $(".look-pro").show();
                        subresultData = eval('data=' + subresultDataStr);
                        readW = 0;
                        readNumber = eval('data=' + readWAll);

                        for (j = 0; j < readNumber.length; j++) {
                            if (readNumber[j]['read'] == 0) {
                                readW++;
                            }
                        }
                        if (readW > 99) {
                            $("#proResult i").show();
                            $("#proResult i").html('99');
                            proResult();
                        } else if (readW == 0) {
                            proMySo();
                            $("#proResult i").hide();
                        } else {
                            proResult();
                            $("#proResult i").show();
                            $("#proResult i").html(readW);
                        }
                        $(".pro-result-null").hide();
                        $("#proTableResult").show();
                        ListResultData(M, N, subresultData, tabC, TabClicks, TabClick0, num);
                        $("#proTableResult table tr").eq(0).addClass("tr-click");
                    }

                case 33:
                case 'end':
                    return _context3.stop();
            }
        }
    }, _callee3, this);
})));

function proMySo() {
    $("#proMySo").addClass("tab-on").siblings("a").removeClass("tab-on");
    $(".e-warning").eq($("#proMySo").index()).show().siblings(".e-warning").hide();
    $(".ft-warning").eq($("#proMySo").index()).show().siblings(".ft-warning").hide();
}
function proResult() {
    $("#proResult").addClass("tab-on").siblings("a").removeClass("tab-on");
    $(".e-warning").eq($("#proResult").index()).show().siblings(".e-warning").hide();
    $(".ft-warning").eq($("#proResult").index()).show().siblings(".ft-warning").hide();
}

function checkBox() {
    if ($('#proTableMy .Y_bg i').hasClass('c-on')) {
        $(".delete-pro").show();
        $(".delete-pro-on").hide();
        $(".off-pro-on").hide();
    } else {
        $(".delete-pro").hide();
        $(".delete-pro-on").show();
        $(".off-pro-on").show();
        $("#on_proset").hide();
        $("#off_proset").hide();
    }
}
//每次加载结果的M-N行
function ListResultData(M, N, subresultData, tabC, TabClicks, TabClick0, num) {
    for (var i = 0; i < N - M + 1; i++) {
        var timeX = userDate(subresultData[i]['time']);
        var molld = subresultData[i]['templates'];
        var market = subresultData[i]['market'] || 120;
        var molds;
        if (molld == "g") {
            molds = "公告类";
        } else if (molld == "l") {
            molds = "问财类";
        } else {
            molds = "股价类";
        }
        $("#proTableResult table").append('<tr class="Y_bg" market="' + market + '" read = "' + subresultData[i]['read'] + '" addr="' + subresultData[i]['addr'] + '" stockcode="' + subresultData[i]['code'] + '" mobileid="' + subresultData[i]['mobileid'] + '" pcid="' + subresultData[i]['pcid'] + '" url="' + subresultData[i]['url'] + '" templates = "' + subresultData[i]['templates'] + '"><td>' + (i + num) + '.' + mCutStr(subresultData[i]['code'] + subresultData[i]['name'], 14, '..') + '</td><td class="mold">' + molds + '</td><td class="recontent">' + mCutStr(subresultData[i]['content'], 25, '...') + '</td><td class="tdl-l reprice">' + subresultData[i]['price'] + '</td><td class="tdl-c">' + timeX + '</td><td><span class="small-icon bg-buy hide">买</span><span class="small-icon bg-sell hide">卖</span></td></tr>');
        if (subresultData[i]['read'] == 0) {
            //url后面参数是1就是预警结果
            proResult();
            $("#proTableResult table tr").last().addClass("tdblod");
            $("#proTableResult table tr").eq(0).addClass("tr-click");
            if (tabC == 1) {
                proResult();
                TabClicks = 1;
            }
            if (tabC == 0) {
                proMySo();
                TabClicks = 0;
            }
        } else {
            $("#proTableResult table tr").eq(0).addClass("tr-click");
            if (tabC == 1) {
                proResult();
                TabClicks = 1;
            }
        }
    }
}

/*全选框*/
$('.listli0 i').live('click', function () {
    var check_on = $(this).parent().find(".c-on");
    var allcheck = $('#proTableMy .Y_bg i');
    var state = [];
    var checkedStr = [];
    if (check_on.css("display") != "inline-block") {
        $(this).addClass("c-on");
        $(".delete-pro").show();
        $(".delete-pro-on").hide();
        allcheck.each(function (i) {
            state.push($(this).parent().parent().attr("state"));
            $(this).addClass('c-on');
        });
        checkedStr = state.join(',');
    } else {
        $(this).removeClass("c-on");
        allcheck.each(function (i) {
            $(this).removeClass('c-on');
        });
        if ($(this).hasClass('c-on') == false) {
            $(".off-pro-on").show();
            $("#on_proset").hide();
            $("#off_proset").hide();
            $(".delete-pro").hide();
            $(".delete-pro-on").show();
        }
    }
    if (checkedStr.indexOf("1") >= 0) {
        $(".off-pro-on").hide();
        $("#on_proset").hide();
        $("#off_proset").show();
    } else {
        $(".off-pro-on").hide();
        $("#on_proset").show();
        $("#off_proset").hide();
    }
});
/*复选框单个选择*/
$('#proTableMy .Y_bg i').live('click', function () {

    var check_on = $(this).parent().find(".c-on");
    var hasCheck = $(this).parent().parent().siblings(".Y_bg").find(".c-on");
    var allcheck = $('.listli0 i');
    var obj = $('#proTableMy .Y_bg i');
    var count = obj.length;
    var selectCount = 0;
    var state = [];
    var checkedStr = [];
    var checked;
    if (check_on.css("display") != "inline-block") {
        $(this).addClass("c-on");
        $(".delete-pro").show();
        $(".delete-pro-on").hide();
        checked = $(".Y_bg .c-on").parent().parent();
    } else {
        $(this).removeClass("c-on");
        checked = $(".Y_bg .c-on").parent().parent();
        if ($(this).hasClass('c-on') == false) {
            $(".off-pro-on").show();
            $("#on_proset").hide();
            $("#off_proset").hide();
        }
    }

    checked.each(function () {
        state.push($(this).attr("state"));
        selectCount++;
    });
    checkedStr = state.join(',');
    if (checkedStr.indexOf("1") >= 0) {
        $(".off-pro-on").hide();
        $("#on_proset").hide();
        $("#off_proset").show();
    } else {
        $(".off-pro-on").hide();
        $("#on_proset").show();
        $("#off_proset").hide();
    }
    if (count == selectCount) {
        allcheck.addClass('c-on');
    } else {
        allcheck.removeClass('c-on');
    }
    if (hasCheck.css("display") != "inline-block" && check_on.css("display") == "inline-block") {
        $(".delete-pro").hide();
        $(".delete-pro-on").show();
        $(".off-pro-on").show();
        $("#on_proset").hide();
        $("#off_proset").hide();
    }
});
/*表格tr背景色*/
$(".pro-table").on('mouseover', '.Y_bg', function () {
    var templates = $(this).attr('templates');
    if (templates == 'g') {
        $(this).find(".set").hide();
    } else {
        $(this).find(".set").show();
    }
    $(this).addClass("tr-hover");
}).on('mouseout', 'tr', function () {
    $(this).find(".set").hide();
    $(this).removeClass("tr-hover");
});
var TimeFn = null;
//我的预警单击
$("#proTableMy").on('click', '.Y_bg', function () {
    $(this).addClass("tr-click").siblings("tr").removeClass("tr-click");
    clearTimeout(TimeFn);
    TimeFn = setTimeout(function () {}, 300);
});
//预警结果手动刷新
$(".refresh").click(function () {
    var isIE = !!window.ActiveXObject;
    var isIE6 = isIE && !window.XMLHttpRequest;
    TaNumber.refreshId();
    if (isIE6) {
        var UrlCurrent = window.location.href.split('?');
        var urls = UrlCurrent[0] + '?TabClicks=1';
        location.href = urls;
        window.location.reload();
    } else {
        var UrlCurrent = window.location.href.split('?');
        var urls = UrlCurrent[0] + '?TabClicks=1';
        location.href = urls;
    }
});

//预警结果单击
$("#proTableResult").on('click', '.Y_bg', function () {
    var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(e) {
        var templates, that, length, addr, hasBlod, clientInterface;
        return _regenerator2.default.wrap(function _callee4$(_context4) {
            while (1) {
                switch (_context4.prev = _context4.next) {
                    case 0:
                        e = e || window.event;

                        if (!$(e.target).hasClass('bg-buy')) {
                            _context4.next = 6;
                            break;
                        }

                        jumpBuy(e, 0);
                        return _context4.abrupt('return');

                    case 6:
                        if (!$(e.target).hasClass('bg-sell')) {
                            _context4.next = 9;
                            break;
                        }

                        jumpBuy(e, 1);
                        return _context4.abrupt('return');

                    case 9:
                        TabClick = 1;
                        templates = $(this).attr('templates');

                        if (templates == 'g') {
                            $(this).find(".set").hide().parent().parent().siblings("tr").find(".set").hide();
                        } else {
                            $(this).find(".set").show().parent().parent().siblings("tr").find(".set").hide();
                        }
                        $(this).addClass("tr-click").siblings("tr").removeClass("tr-click");
                        that = this;

                        $(".pro-table").on('mouseout', 'tr', function () {
                            if (templates == 'g') {
                                $(that).find(".set").hide().parent().parent().siblings("tr").find(".set").hide();
                            } else {
                                $(that).find(".set").show().parent().parent().siblings("tr").find(".set").hide();
                            }
                        });
                        length = $("#proResult i").html();
                        addr = $(this).attr("addr");
                        hasBlod = $(this).hasClass('tdblod');

                        if (!hasBlod) {
                            _context4.next = 24;
                            break;
                        }

                        $("#proResult i").html(length - 1);
                        $(this).removeClass("tdblod");
                        clientInterface = new ComClientInterface();
                        _context4.next = 24;
                        return clientInterface.setAlertResultRead(addr);

                    case 24:
                        if ($("#proResult i").html() == 0) {
                            $("#proResult i").hide();
                        }
                        clearTimeout(TimeFn);
                        TimeFn = setTimeout(function () {}, 300);

                    case 27:
                    case 'end':
                        return _context4.stop();
                }
            }
        }, _callee4, this);
    }));

    return function (_x) {
        return _ref4.apply(this, arguments);
    };
}());
//我的预警双击
$("#proTableMy").on('dblclick', '.Y_bg', function () {
    $(this).addClass("tr-click").siblings("tr").removeClass("tr-click");
    clearTimeout(TimeFn);
    var stockcode = $(this).attr('stockcode');
    var market = $(this).attr('market');
    var mStock = stockcode + '|0|0|' + market;
    url = "hxa://hexin.exe 'opt=13&param=" + mStock + "'";
    location.href = url;
});
//预警结果双击
$("#proTableResult").on('dblclick', '.Y_bg', (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5() {
    var quote, addr, length, hasBlod, clientInterface, stockcode, templates, pcid, urlstr;
    return _regenerator2.default.wrap(function _callee5$(_context5) {
        while (1) {
            switch (_context5.prev = _context5.next) {
                case 0:
                    TabClick = 1;
                    quote = new ThsQuote();

                    $(this).addClass("tr-click").siblings("tr").removeClass("tr-click");
                    addr = $(this).attr("addr");
                    length = $("#proResult i").html();
                    hasBlod = $(this).hasClass('tdblod');
                    clientInterface = new ComClientInterface();

                    if (!hasBlod) {
                        _context5.next = 12;
                        break;
                    }

                    $("#proResult i").html(length - 1);
                    $(this).removeClass("tdblod");
                    // var clientInterface = new ComClientInterface();
                    _context5.next = 12;
                    return clientInterface.setAlertResultRead(addr);

                case 12:
                    if ($("#proResult i").html() == 0) {
                        $("#proResult i").hide();
                    }

                    stockcode = $("#proTableResult table").find(".tr-click").attr('stockcode');
                    templates = $("#proTableResult table").find(".tr-click").attr('templates');
                    pcid = $("#proTableResult table").find(".tr-click").attr('pcid');
                    urlstr = $("#proTableResult table").find(".tr-click").attr('url');

                    if (!(templates == 'g')) {
                        _context5.next = 29;
                        break;
                    }

                    if (!(urlstr == '#')) {
                        _context5.next = 25;
                        break;
                    }

                    url = "hxa://hexin.exe 'opt=13&param=" + stockcode + "'";
                    location.href = url;
                    _context5.next = 23;
                    return quote.actionCommand(31502);

                case 23:
                    _context5.next = 27;
                    break;

                case 25:
                    _context5.next = 27;
                    return clientInterface.openURL(urlstr);

                case 27:
                    _context5.next = 36;
                    break;

                case 29:
                    if (!(templates == "l")) {
                        _context5.next = 34;
                        break;
                    }

                    _context5.next = 32;
                    return clientInterface.openURL(urlstr, 6);

                case 32:
                    _context5.next = 36;
                    break;

                case 34:
                    url = "hxa://hexin.exe 'opt=13&param=" + stockcode + "'";
                    location.href = url;

                case 36:
                    clearTimeout(TimeFn);

                case 37:
                case 'end':
                    return _context5.stop();
            }
        }
    }, _callee5, this);
})));

/*我的预警和预警结果切换*/
$(".pro-tab a").click(function () {
    $(this).addClass("tab-on").siblings("a").removeClass("tab-on");
    $(".e-warning").eq($(this).index()).show().siblings(".e-warning").hide();
    $(".ft-warning").eq($(this).index()).show().siblings(".ft-warning").hide();
});
//tab中的我的预警
$("#proMySo").click(function () {
    TaNumber.proMySo();
    if (TabClicks == 0) {
        return false;
    } else {
        $("#proResult i").hide();
        TabClicks = 0;
    }
});
//tab中预警结果
$("#proResult").click(function () {
    var isIE = !!window.ActiveXObject;
    var isIE6 = isIE && !window.XMLHttpRequest;
    TaNumber.proResult();
    if (TabClicks == 1 || NewNumber == 0) {
        return false;
    } else {
        TabClicks = 1;
        if (isIE6) {
            var UrlCurrent = window.location.href.split('?');
            var urls = UrlCurrent[0] + '?TabClicks=1';
            location.href = urls;
            window.location.reload();
        } else {
            var UrlCurrent = window.location.href.split('?');
            var urls = UrlCurrent[0] + '?TabClicks=1';
            location.href = urls;
        }
    }
});

/*点击清空列表后面下拉菜单出来*/
//var flag = true;
$(".plate-up").live('click', function () {
    $(".plate-list").css('position', 'absolute');
    $(".plate-list").show();
    $(".plate-down").show();
    $(".plate-up").hide();
});
$(".plate-down").live('click', function () {
    $(".plate-list").css('position', 'static');
    $(".plate-list").hide();
    $(".plate-up").show();
    $(".plate-down").hide();
});
$(document).click(function (e) {
    var target = $(e.target);
    if (target.closest('.plate-up').length == 0 && target.closest('.plate').length == 0) {
        $(".plate-list").css('display', 'none');
        $(".plate-list").css('position', 'static');
        $(".import-list").hide();
        $(".plate-up").show();
        $(".plate-down").hide();
        flag = true;
    }
});
$('.plate').focus(function () {
    this.blur();
    //$(".plate-up").click();
});

/*导出文件*/
//export 和 import-list是否失去焦点
var exportFlag = false;
var importFlag = false;
var isHideImport = function isHideImport() {
    setTimeout(function () {
        if (importFlag != exportFlag) {
            $(".import-list").hide();
        }
    }, 50);
};
/**
 * 组合导出格式
 * @param string formatType 格式，excel|text
 */
var tableTh = ['预警品种', '预警类型', '预警内容', '价格', '预警时间'];
var assembleText = function assembleText(formatType) {
    formatType = formatType || 'excel';
    var trObj = $("#proTableResult table tr"),

    //分隔符、换行符
    delimiter = formatType == 'text' ? '\t' : '\t',
        newline = formatType == 'text' ? '\r\n' : '\r\n',
        returnText = tableTh.join(delimiter) + newline,
        trArr = new Array();

    trObj.each(function (i, tr) {
        var tdArr = new Array();
        $(tr).find('td').each(function (i, td) {
            if (i < tableTh.length) {
                tdArr.push($(td).html().replace(/<[^>]+>/g, ''));
            }
        });
        trArr.push(tdArr.join(delimiter));
    });
    returnText += trArr.join(newline);
    //alert(returnText);
    return returnText;
};
$(".export").mouseover(function () {
    exportFlag = false;
    importFlag = false;
    $(".import-list").show();
});
$(".export").mouseleave(function () {
    exportFlag = true;
    isHideImport();
});
$(".import-list").mouseover(function () {
    exportFlag = false;
    importFlag = false;
});
$(".import-list").mouseleave(function () {
    importFlag = true;
    isHideImport();
});
$("#exportExcel").click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6() {
    var text, clientInterface;
    return _regenerator2.default.wrap(function _callee6$(_context6) {
        while (1) {
            switch (_context6.prev = _context6.next) {
                case 0:
                    TaNumber.exportRe();
                    text = assembleText('excel');
                    //接口

                    clientInterface = new ComClientInterface();
                    _context6.next = 5;
                    return clientInterface.exportSubContent(0, text);

                case 5:
                case 'end':
                    return _context6.stop();
            }
        }
    }, _callee6, this);
})));
$("#exportText").click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7() {
    var text, clientInterface;
    return _regenerator2.default.wrap(function _callee7$(_context7) {
        while (1) {
            switch (_context7.prev = _context7.next) {
                case 0:
                    TaNumber.exportRe();
                    text = assembleText('text');
                    //接口

                    clientInterface = new ComClientInterface();
                    _context7.next = 5;
                    return clientInterface.exportSubContent(1, text);

                case 5:
                case 'end':
                    return _context7.stop();
            }
        }
    }, _callee7, this);
})));
$("#exportToBoard").click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8() {
    var text, clientInterface;
    return _regenerator2.default.wrap(function _callee8$(_context8) {
        while (1) {
            switch (_context8.prev = _context8.next) {
                case 0:
                    TaNumber.exportRe();
                    text = assembleText('text');
                    //	window.clipboardData.setData('Text', text);
                    //接口

                    clientInterface = new ComClientInterface();
                    _context8.next = 5;
                    return clientInterface.exportSubContent(2, text);

                case 5:
                case 'end':
                    return _context8.stop();
            }
        }
    }, _callee8, this);
})));

//排序部分
/**
 * 排序方法
 * @param obj domObj 要排序的table对象
 * @param string sortType 排序的字段(时间max)，'stockcode|time'
 */
var operaTable = function operaTable(tableObj, sortType, sort) {
    sortType = sortType || 'pcid';
    //获取tbody下的tr
    var tbBodyTr = $(tableObj).children('tbody').find('tr'),
        tbBodyTrLenght = tbBodyTr.length,
        isTrue = false,
        tmp1,
        tmp2;
    for (var i = 0; i < tbBodyTrLenght - 2; i += 2) {
        for (var k = i + 2; k < tbBodyTrLenght + 2; k += 2) {
            var kValue1 = $(tbBodyTr[i]).attr(sortType),
                kValue2 = $(tbBodyTr[k]).attr(sortType);
            isTrue = sort == 'asc' ? parseFloat(kValue1) > parseFloat(kValue2) : parseFloat(kValue1) < parseFloat(kValue2);
            if (isTrue) {
                var a = $(tbBodyTr[i]);
                var b = $(tbBodyTr[i + 2]);
                $(a).replaceWith($(b));
                $(b).next().after($(a));
                var a = $(tbBodyTr[i + 1]);
                var b = $(tbBodyTr[i + 3]);
                $(a).replaceWith($(b));
                $(b).next().after($(a));
            }
        }
    }
};
$(".sort0, .sort1").click(function (e) {
    var target = $(e.target);
    var tableObj = $(this).parent().parent().siblings('div').find('table');
    //排序方式
    var sortType = '';
    var sort = 'desc';
    if (target.closest('.sort0').length > 0) {
        sortType = 'Key';
        sort = 'asc';
    } else if (target.closest('.sort1').length > 0) {
        sortType = 'Key';
        sort = 'desc';
    } else {
        return;
    }
    $(this).siblings('a').show();
    $(this).hide();
    operaTable(tableObj, sortType, sort);
});
/**
 * COCO预警状态排序
 * @authtor yinkeke@myhexin.com
 * @addTime 2017年05月11日
 * @return {[type]} [description]
 */
var tableSort = function tableSort(asc, target) {

    var $target = target;
    var li = $target.closest('li');
    var tbody = $('#proTableMy').find('tbody:first');
    var tr = tbody.find('tr');
    var trLength = tr.length;
    var index = li.index(); //获得当前是第几个表格

    var liArr = [],
        trObj;
    for (var i = 0, len = trLength; i < len; i++) {

        trObj = [tr.eq(i), tr.eq(i + 1)];
        liArr.push(trObj);
        i++;
    }

    liArr.sort(function (a, b) {
        var text1 = a[0].find('td').eq(index).text();
        var text2 = b[0].find('td').eq(index).text();
        var x, y;
        if (text1.indexOf('运行中') > -1) {

            x = 1;
        } else if (text1.indexOf('已关闭') > -1) {

            x = 0;
        }

        if (text2.indexOf('运行中') > -1) {
            y = 1;
        } else if (text2.indexOf('已关闭') > -1) {
            y = 0;
        }

        if (asc) {
            return x - y;
        } else {
            return y - x;
        }
    });

    tbody.empty();
    var tpml = '';
    for (i = 0, len = trLength / 2; i < len; i++) {
        tpml += liArr[i][0].prop('outerHTML') + liArr[i][1].prop('outerHTML');
    }
    tbody.append(tpml);
};
$('.s-bottom, .s-top').click(function (e) {

    e = e || window.event;
    var asc = false;
    var $target = $(e.target);
    if ($target.hasClass('s-bottom')) {
        $target.hide();
        $('.s-top').show();
        asc = false;
    } else if ($target.hasClass('s-top')) {
        $target.hide();
        $('.s-bottom').show();
        asc = true;
    }

    //执行排序方法
    tableSort(asc, $target);
});
/*添加预警*/
$(".add-pro").click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9() {
    var pcurStock, code, market, clientInterface;
    return _regenerator2.default.wrap(function _callee9$(_context9) {
        while (1) {
            switch (_context9.prev = _context9.next) {
                case 0:
                    pcurStock = new ThsPassport();
                    _context9.next = 3;
                    return pcurStock.curStock();

                case 3:
                    code = _context9.sent;
                    _context9.next = 6;
                    return pcurStock.getMarketStock('');

                case 6:
                    market = _context9.sent;
                    clientInterface = new ComClientInterface();
                    _context9.next = 10;
                    return clientInterface.openBrownSetSub(code, market);

                case 10:
                    TaNumber.addProset();

                case 11:
                case 'end':
                    return _context9.stop();
            }
        }
    }, _callee9, this);
})));

/*修改预警*/
$("#proTableMy").on('click', 'tr .g-revise', (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10() {
    var stockcode, market, templates, pcid, mobileid, modehtml, clientInterface, mStock, tipC, yjPrice, listTips, bH, fhtml, bhtml;
    return _regenerator2.default.wrap(function _callee10$(_context10) {
        while (1) {
            switch (_context10.prev = _context10.next) {
                case 0:
                    TaNumber.gRevise();
                    stockcode = $(this).parent().parent().attr('stockcode');
                    market = $(this).parent().parent().attr('market');
                    templates = $(this).parent().parent().attr('templates');
                    pcid = $(this).parent().parent().attr('pcid');
                    mobileid = $(this).parent().parent().attr('mobileid');
                    modehtml = $(this).parent().parent().attr('modehtml');
                    clientInterface = new ComClientInterface();

                    $('.yj_price').hide();
                    $('.yj_price').val($(this).parent().parent().next().find(".Tip_wrap .yj_price").attr('vals'));
                    $(".yj_mode").hide();
                    $(".list_tips").html('');
                    $(".F_bg").hide();
                    mStock = market + ':' + stockcode;
                    _context10.prev = 14;
                    _context10.next = 17;
                    return hqQuote.request(condition.renderList, mStock, 'now', stockcode);

                case 17:
                    _context10.next = 21;
                    break;

                case 19:
                    _context10.prev = 19;
                    _context10.t0 = _context10['catch'](14);

                case 21:
                    if (!(templates == 'j' || templates == 'k')) {
                        _context10.next = 26;
                        break;
                    }

                    _context10.next = 24;
                    return clientInterface.modLocalAlertCfg(pcid);

                case 24:
                    _context10.next = 27;
                    break;

                case 26:
                    if (templates == 'g' || templates == 'l') {
                        $(this).parent().parent().next().show();
                        $(this).parent().parent().next().find('.yj_mode').show();
                        $(".yj_mode").html(mCutStr(modehtml, 18, '..'));
                        condition.bindEvent();
                    } else {
                        $(this).parent().parent().next().show();
                        $(this).parent().parent().next().find('.yj_price').show();
                        $(this).parent().parent().next().find('.yj_mode').show();
                        $(".yj_mode").html(mCutStr(modehtml, 18, '..'));
                        tipC = $(this).parent().parent().next().find(".Tip_wrap .Tip_c");
                        yjPrice = $(this).parent().parent().next().find(".Tip_wrap .yj_price");
                        listTips = $(this).parent().parent().next().find(".Tip_wrap .list_tips");

                        yjPrice.attr("view_less_value", "");
                        yjPrice.attr("view_max_value", "");
                        listTips.attr("view_empty_msg", "条件不可为空");
                        listTips.attr("view_less_msg", "");
                        listTips.attr("view_max_msg", "");
                        listTips.attr("view_valid_msg", "");
                        if (templates == 'a') {
                            $(".F_bg").find(".Tip_wrap .Tip_c").removeClass("view_price_up");
                            $(".F_bg").find(".Tip_wrap .yj_price").removeClass("view_price_up_input");
                            $(".F_bg").find(".Tip_wrap .list_tips").removeClass("view_price_up_msg");
                            tipC.addClass("view_price_up");
                            yjPrice.addClass("view_price_up_input");
                            listTips.addClass("view_price_up_msg");
                            listTips.attr("view_less_msg", "不可小于现价");
                        }
                        if (templates == 'b') {
                            $(".F_bg").find(".Tip_wrap .Tip_c").removeClass("view_price_down");
                            $(".F_bg").find(".Tip_wrap .yj_price").removeClass("view_price_down_input");
                            $(".F_bg").find(".Tip_wrap .list_tips").removeClass("view_price_down_msg");
                            tipC.addClass("view_price_down");
                            yjPrice.addClass("view_price_down_input");
                            listTips.addClass("view_price_down_msg");
                            listTips.attr("view_max_msg", "不可大于现价");
                        }
                        if (templates == 'c') {
                            $(".F_bg").find(".Tip_wrap .Tip_c").removeClass("view_day_zhangfu");
                            $(".F_bg").find(".Tip_wrap .yj_price").removeClass("view_day_zhangfu_input");
                            $(".F_bg").find(".Tip_wrap .list_tips").removeClass("view_day_zhangfu_msg");
                            tipC.addClass("view_day_zhangfu");
                            yjPrice.addClass("view_day_zhangfu_input");
                            listTips.addClass("view_day_zhangfu_msg");
                            yjPrice.attr("view_max_value", "10.09");
                            listTips.attr("view_max_msg", "不可大于10%");
                        }
                        if (templates == 'd') {
                            $(".F_bg").find(".Tip_wrap .Tip_c").removeClass("view_day_diefu");
                            $(".F_bg").find(".Tip_wrap .yj_price").removeClass("view_day_diefu_input");
                            $(".F_bg").find(".Tip_wrap .list_tips").removeClass("view_day_diefu_msg");
                            tipC.addClass("view_day_diefu");
                            yjPrice.addClass("view_day_diefu_input");
                            listTips.addClass("view_day_diefu_msg");
                            yjPrice.attr("view_max_value", "10.09");
                            listTips.attr("view_max_msg", "不可大于10%");
                        }
                        if (templates == 'e') {
                            $(".F_bg").find(".Tip_wrap .Tip_c").removeClass("view_fivemin_zhangfu");
                            $(".F_bg").find(".Tip_wrap .yj_price").removeClass("view_fivemin_zhangfu_input");
                            $(".F_bg").find(".Tip_wrap .list_tips").removeClass("view_fivemin_zhangfu_msg");
                            tipC.addClass("view_fivemin_zhangfu");
                            yjPrice.addClass("view_fivemin_zhangfu_input");
                            listTips.addClass("view_fivemin_zhangfu_msg");
                            yjPrice.attr("view_max_value", "22");
                            listTips.attr("view_max_msg", "不可大于22%");
                        }
                        if (templates == 'f') {
                            $(".F_bg").find(".Tip_wrap .Tip_c").removeClass("view_fivemin_diefu");
                            $(".F_bg").find(".Tip_wrap .yj_price").removeClass("view_fivemin_diefu_input");
                            $(".F_bg").find(".Tip_wrap .list_tips").removeClass("view_fivemin_diefu_msg");
                            tipC.addClass("view_fivemin_diefu");
                            yjPrice.addClass("view_fivemin_diefu_input");
                            listTips.addClass("view_fivemin_diefu_msg");
                            yjPrice.attr("view_max_value", "22");
                            listTips.attr("view_max_msg", "不可大于22%");
                        }
                        if (templates == 'h') {
                            $(".F_bg").find(".Tip_wrap .Tip_c").removeClass("view_huanshoulv");
                            $(".F_bg").find(".Tip_wrap .yj_price").removeClass("view_huanshoulv_input");
                            $(".F_bg").find(".Tip_wrap .list_tips").removeClass("view_huanshoulv_msg");
                            tipC.addClass("view_huanshoulv");
                            yjPrice.addClass("view_huanshoulv_input");
                            listTips.addClass("view_huanshoulv_msg");
                            yjPrice.attr("view_max_value", "100");
                            listTips.attr("view_max_msg", "不可大于100%");
                        }
                        if (templates == 'i') {
                            $(".F_bg").find(".Tip_wrap .Tip_c").removeClass("view_one_chengjiaoliang");
                            $(".F_bg").find(".Tip_wrap .yj_price").removeClass("view_one_chengjiaoliang_input");
                            $(".F_bg").find(".Tip_wrap .list_tips").removeClass("view_one_chengjiaoliang_msg");
                            tipC.addClass("view_one_chengjiaoliang");
                            yjPrice.addClass("view_one_chengjiaoliang_input");
                            listTips.addClass("view_one_chengjiaoliang_msg");
                        }
                        condition.bindEvent();
                    }

                case 27:
                    bH = $("#proTableMy").scrollTop();
                    fhtml = $("#proTableMy .Y_bg").last().html();
                    bhtml = $(this).parent().parent().html();

                    if (fhtml == bhtml) {
                        $("#proTableMy").scrollTop($("#proTableMy").scrollTop() + 40);
                    }

                case 31:
                case 'end':
                    return _context10.stop();
            }
        }
    }, _callee10, this, [[14, 19]]);
})));
//取消修改
$("#proTableMy, #proTableResult").on('click', 'tr .yj_cancel', function () {
    $('.yj_price').hide();
    $(".yj_mode").hide();
    $(".F_bg").hide();
});
//预警结果里面单行修改设置
/*$("#proTableResult").on('click','tr .set',async function(){
    TaNumber.resultSet();

    var stockcode = $(this).parent().parent().attr('stockcode');
    var templates = $(this).parent().parent().attr('templates');
    var pcid = $(this).parent().parent().attr('pcid');
    var clientInterface = new ComClientInterface();

    if(templates == 'j'){
        await clientInterface.modLocalAlertCfg(pcid);
    }else{
        //await clientInterface.openBrownSetSub(stockcode);
        $(".F_bg").hide();
        $(this).parent().parent().next().show();
        $(this).parent().parent().next().find('.yj_price').show();
    }

});*/

/*删除单行预警my*/
$(".g-delete").live("click", (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11() {
    var deleteSimgle, deleteSimgleM, deletesim, stockcode, deletesmob, templates, value, clientInterface, subscribeData, length, checkedSimStr, del, time, checkedSimStrM, delM;
    return _regenerator2.default.wrap(function _callee11$(_context11) {
        while (1) {
            switch (_context11.prev = _context11.next) {
                case 0:
                    reloadDelN = true;
                    TaNumber.gDelete();
                    deleteSimgle = [];
                    deleteSimgleM = [];
                    deletesim = $(this).parent().parent().attr('pcid');
                    stockcode = $(this).parent().parent().attr('stockcode');
                    deletesmob = $(this).parent().parent().attr('mobileid');
                    templates = $(this).parent().parent().attr('templates');
                    value = $(this).parent().parent().attr('value');
                    clientInterface = new ComClientInterface();
                    _context11.next = 12;
                    return clientInterface.getSubData();

                case 12:
                    subscribeDataStr = _context11.sent;
                    subscribeData = eval("data=" + subscribeDataStr);
                    length = subscribeData.length;

                    if (!(deletesim != '')) {
                        _context11.next = 22;
                        break;
                    }

                    deleteSimgle.push('pcid:' + deletesim);
                    checkedSimStr = deleteSimgle.join(',');
                    _context11.next = 20;
                    return clientInterface.delsubscribe(checkedSimStr);

                case 20:
                    del = _context11.sent;

                    if (del == true) {
                        $(".kinds_tip").html('删除成功！');
                        $(".kinds_tip").fadeIn(500);
                        $(this).parent().parent().next().remove();
                        $(this).parent().parent().remove();
                        //alert($(this).parent().parent().remove());
                        clearTimeout(time);
                        time = setTimeout(function () {
                            if ($("#proTableMy .Y_bg").length == 0) {
                                $('#proTableMy').hide();
                                $(".pro-text-null").show();
                                $(".listli0 i").css('visibility', 'hidden');
                            }
                            $(".kinds_tip").fadeOut(500);
                            $("#proTableMy table tr").eq(0).addClass("tr-click");
                            checkBox();
                        }, 500);
                    } else {
                        $(".kinds_tip").html('删除失败！');
                        $(".kinds_tip").fadeIn(500);
                        clearTimeout(time);
                        time = setTimeout(function () {
                            $(".kinds_tip").fadeOut(500);
                        }, 50);
                    }

                case 22:
                    if (!(deletesmob != '')) {
                        _context11.next = 29;
                        break;
                    }

                    deleteSimgleM.push('mobileid:' + deletesmob);
                    checkedSimStrM = deleteSimgleM.join(',');
                    _context11.next = 27;
                    return clientInterface.delsubscribe(checkedSimStrM);

                case 27:
                    delM = _context11.sent;

                    if (delM == true) {
                        $(".kinds_tip").html('删除成功！');
                        $(".kinds_tip").fadeIn(500);
                        $(this).parent().parent().next().remove();
                        $(this).parent().parent().remove();
                        clearTimeout(time);
                        time = setTimeout(function () {
                            if ($("#proTableMy .Y_bg").length == 0) {
                                $('#proTableMy').hide();
                                $(".pro-text-null").show();
                                $(".listli0 i").css('visibility', 'hidden');
                            }
                            $(".kinds_tip").fadeOut(500);
                            $("#proTableMy table tr").eq(0).addClass("tr-click");
                            checkBox();
                        }, 500);
                    } else {
                        $(".kinds_tip").html('删除失败！');
                        $(".kinds_tip").fadeIn(1000);
                        clearTimeout(time);
                        time = setTimeout(function () {
                            $(".kinds_tip").fadeOut(1000);
                        }, 50);
                    }

                case 29:
                case 'end':
                    return _context11.stop();
            }
        }
    }, _callee11, this);
})));

/*删除所选*/

$(".delete-pro").click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee12() {
    var checkeds, checkedsM, checked, clientInterface, subscribeData, length, checkedStr, del, time;
    return _regenerator2.default.wrap(function _callee12$(_context12) {
        while (1) {
            switch (_context12.prev = _context12.next) {
                case 0:
                    reloadDelN = true;
                    TaNumber.deleteProset();
                    checkeds = [];
                    checkedsM = [];
                    checked = $(".Y_bg .c-on").parent().parent();
                    clientInterface = new ComClientInterface();
                    _context12.next = 8;
                    return clientInterface.getSubData();

                case 8:
                    subscribeDataStr = _context12.sent;
                    subscribeData = eval("data=" + subscribeDataStr);
                    length = subscribeData.length;

                    checked.each(function (i) {
                        if ($(this).attr("pcid") !== undefined || $(this).attr("pcid") !== '') {
                            checkeds.push('pcid:' + $(this).attr("pcid"));
                        }
                        if ($(this).attr("mobileid") !== undefined || $(this).attr("mobileid") !== '') {
                            checkeds.push('mobileid:' + $(this).attr("mobileid"));
                        }
                    });

                    if (!(checked.length == 0)) {
                        _context12.next = 16;
                        break;
                    }

                    alert("没有要删除的预警");
                    _context12.next = 21;
                    break;

                case 16:
                    checkedStr = checkeds.join(',');
                    _context12.next = 19;
                    return clientInterface.delsubscribe(checkedStr);

                case 19:
                    del = _context12.sent;

                    if (del == true) {
                        $(".kinds_tip").html('删除成功！');
                        $(".kinds_tip").fadeIn(500);
                        $(".listli0 i").removeClass('c-on');
                        checked.remove();

                        //clearTimeout(time);
                        time = setTimeout(function () {
                            if ($("#proTableMy .Y_bg").length == 0) {
                                $('#proTableMy').hide();
                                $(".pro-text-null").show();
                                $(".listli0 i").css('visibility', 'hidden');
                            }
                            $(".kinds_tip").fadeOut(500);
                            $("#proTableMy table tr").eq(0).addClass("tr-click");
                            checkBox();
                        }, 500);
                    } else {
                        $(".kinds_tip").html('删除失败！');
                        $(".kinds_tip").fadeIn(500);
                        clearTimeout(time);
                        time = setTimeout(function () {
                            $(".kinds_tip").fadeOut(500);
                        }, 500);
                    }

                case 21:
                case 'end':
                    return _context12.stop();
            }
        }
    }, _callee12, this);
})));
//关闭所选id
$("#off_proset").on('click', (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee13() {
    var checked, checkeds, checkedStr, clientInterface;
    return _regenerator2.default.wrap(function _callee13$(_context13) {
        while (1) {
            switch (_context13.prev = _context13.next) {
                case 0:
                    reloadDelN = true;
                    checked = $(".Y_bg .c-on").parent().parent();
                    checkeds = [];

                    checked.each(function (i) {
                        if ($(this).attr("pcid") !== undefined || $(this).attr("pcid") !== '') {
                            checkeds.push('pcid:' + $(this).attr("pcid"));
                        }
                        if ($(this).attr("mobileid") !== undefined || $(this).attr("mobileid") !== '') {
                            checkeds.push('mobileid:' + $(this).attr("mobileid"));
                        }
                    });
                    checkedStr = checkeds.join(',');
                    clientInterface = new ComClientInterface();
                    _context13.next = 8;
                    return clientInterface.closeSub(checkedStr);

                case 8:

                    checked.each(function (i) {
                        $(this).find('.state').html('已关闭');
                        $(this).attr('state', 0);
                    });

                    $(".off-pro-on").hide();
                    $("#on_proset").show();
                    $("#off_proset").hide();

                    TaNumber.offProset();

                case 13:
                case 'end':
                    return _context13.stop();
            }
        }
    }, _callee13, this);
})));
//开启所选id
$("#on_proset").on('click', (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee14() {
    var checked, checkeds, checkedStr, clientInterface;
    return _regenerator2.default.wrap(function _callee14$(_context14) {
        while (1) {
            switch (_context14.prev = _context14.next) {
                case 0:
                    reloadDelN = true;
                    checked = $(".Y_bg .c-on").parent().parent();
                    checkeds = [];

                    checked.each(function (i) {
                        if ($(this).attr("pcid") !== undefined || $(this).attr("pcid") !== '') {
                            checkeds.push('pcid:' + $(this).attr("pcid"));
                        }
                        if ($(this).attr("mobileid") !== undefined || $(this).attr("mobileid") !== '') {
                            checkeds.push('mobileid:' + $(this).attr("mobileid"));
                        }
                    });
                    checkedStr = checkeds.join(',');
                    clientInterface = new ComClientInterface();
                    _context14.next = 8;
                    return clientInterface.openSub(checkedStr);

                case 8:
                    checked.each(function (i) {
                        $(this).find('.state').html('运行中');
                        $(this).attr('state', 1);
                    });

                    $(".off-pro-on").hide();
                    $("#on_proset").hide();
                    $("#off_proset").show();
                    TaNumber.onProset();

                case 13:
                case 'end':
                    return _context14.stop();
            }
        }
    }, _callee14, this);
})));
//删除某一行结果页下面的删除选中
$("#deleteMh").click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee15() {
    var deletes, clientInterface, del, trlength, FB, len, time;
    return _regenerator2.default.wrap(function _callee15$(_context15) {
        while (1) {
            switch (_context15.prev = _context15.next) {
                case 0:
                    TaNumber.deleteMh();
                    deletes = $("#proTableResult table").find(".tr-click").attr("addr");
                    clientInterface = new ComClientInterface();
                    _context15.next = 5;
                    return clientInterface.moveSubResult(deletes);

                case 5:
                    del = _context15.sent;
                    trlength = $("#proTableResult table tr").length;
                    FB = $("#proTableResult table").find(".tr-click");
                    len = $("#proResult i").html();

                    if (del == true) {
                        $(".kinds_tip").html('删除成功！');
                        $(".kinds_tip").fadeIn(500);
                        clearTimeout(time);
                        time = setTimeout(function () {
                            if (trlength == 1) {
                                $("#proResult i").hide();
                                $("#proResult i").html(0);
                            }
                            if (FB.hasClass('tdblod')) {
                                len--;
                                $("#proResult i").html(len);
                            }
                            $("#proTableResult table").find(".tr-click").remove();
                            $(".kinds_tip").fadeOut(500);
                            $("#proTableResult table tr").eq(0).addClass("tr-click");
                        }, 500);
                    } else {
                        $(".kinds_tip").html('删除失败！');
                        $(".kinds_tip").fadeIn(500);
                        clearTimeout(time);
                        time = setTimeout(function () {
                            $(".kinds_tip").fadeOut(500);
                        }, 500);
                    }

                case 10:
                case 'end':
                    return _context15.stop();
            }
        }
    }, _callee15, this);
})));
/*点击清空列表*/
$(".plate").click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee16() {
    var lengths, clientInterface, del, time;
    return _regenerator2.default.wrap(function _callee16$(_context16) {
        while (1) {
            switch (_context16.prev = _context16.next) {
                case 0:
                    lengths = $("#proTableResult table tr").length;

                    if (!(lengths > 0)) {
                        _context16.next = 9;
                        break;
                    }

                    clientInterface = new ComClientInterface();
                    _context16.next = 5;
                    return clientInterface.moveSubResult('all');

                case 5:
                    del = _context16.sent;

                    if (del == true) {
                        $(".kinds_tip").html('清空成功！');
                        $(".kinds_tip").fadeIn(1000);
                        $(".look-pro-on").show();
                        $(".look-pro").hide();
                        clearTimeout(time);
                        time = setTimeout(function () {
                            $("#proTableResult").hide();
                            $("#proTableResult table tr").remove();
                            $("#proResult i").hide();
                            $(".pro-result-null").show();
                            $("#proResult i").html(0);
                            $(".kinds_tip").fadeOut(1000);
                        }, 500);

                        $(".plate-list").hide();
                        $(".plate-up").show();
                        $(".plate-down").hide();
                    } else {
                        $(".kinds_tip").html('当前没有预警结果哦！');
                        $(".kinds_tip").fadeIn(1000);
                        clearTimeout(time);
                        time = setTimeout(function () {
                            $(".kinds_tip").fadeOut(1000);
                        }, 500);
                    }

                    _context16.next = 9;
                    break;

                case 9:

                    TaNumber.plateNull();

                case 10:
                case 'end':
                    return _context16.stop();
            }
        }
    }, _callee16, this);
})));
/**
 * 已读全部
 */
$('.read-all').click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee17() {
    var clientInterface, utils, readWAll, i, len;
    return _regenerator2.default.wrap(function _callee17$(_context17) {
        while (1) {
            switch (_context17.prev = _context17.next) {
                case 0:
                    clientInterface = new ComClientInterface();
                    utils = new ThsUtil();
                    _context17.next = 4;
                    return utils.getAlertResult();

                case 4:
                    readWAll = _context17.sent;

                    readWAll = eval("(" + readWAll + ")");
                    i = 0, len = readWAll.length;

                case 7:
                    if (!(i < len)) {
                        _context17.next = 13;
                        break;
                    }

                    _context17.next = 10;
                    return clientInterface.setAlertResultRead(readWAll[i]['addr']);

                case 10:
                    i++;
                    _context17.next = 7;
                    break;

                case 13:

                    $('#proTableResult').find('tr').removeClass('tdblod');
                    $('#proResult').find('.btn').hide();

                case 15:
                case 'end':
                    return _context17.stop();
            }
        }
    }, _callee17, this);
})));
/*查看走势*/
$(".look-pro").click(function () {
    TaNumber.lookProset();
    var stockcode = $("#proTableResult table").find(".tr-click").attr('stockcode');
    var market = $("#proTableResult table").find(".tr-click").attr('market');
    var mStock = stockcode + '|0|0|' + market;
    if (typeof stockcode != 'undefined') {
        url = "hxa://hexin.exe 'opt=13&param=" + mStock + "'";
        location.href = url;
    }
});
//加入板块
$("#add_bankuan").click((0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee18() {
    var stockcode, clientInterface;
    return _regenerator2.default.wrap(function _callee18$(_context18) {
        while (1) {
            switch (_context18.prev = _context18.next) {
                case 0:
                    stockcode = $("#proTableResult table").find(".tr-click").attr('stockcode');
                    clientInterface = new ComClientInterface();
                    _context18.next = 4;
                    return clientInterface.addCodeToBlock(stockcode);

                case 4:
                    TaNumber.addBankuan();

                case 5:
                case 'end':
                    return _context18.stop();
            }
        }
    }, _callee18, this);
})));

//点击预警方式修改
$(".yj_mode").live('click', function () {
    $('.mask').show();
    $(".s-box").show();
    var pcid = $(this).parent().parent().prev().attr('pcid');
    var modestr = $(this).parent().parent().prev().attr('arrmode');

    var arrmode_m = modestr.split(",");

    if (modestr != '') {
        if (arrmode_m[0] == 1) {
            $("#keep_monitor").addClass("c-on");
        } else {
            $("#keep_monitor").removeClass("c-on");
        }
        if (arrmode_m[1] == 1) {
            $("#show_pop").addClass("c-on");
        } else {
            $("#show_pop").removeClass("c-on");
        }
        if (arrmode_m[5] == 1) {
            $("#keep_iphone").addClass("c-on");
        } else {
            $("#keep_iphone").removeClass("c-on");
        }

        if (arrmode_m[6] == 1) {
            $("#call_auction").addClass("c-on");
        } else {
            $("#call_auction").removeClass("c-on");
        }

        if (arrmode_m[2] == 1) {
            if (arrmode_m[4] == 'alert') {
                $("#soundid").find('[value="alert"]').get(0).selected = true;
            } else if (arrmode_m[4] == 'up') {
                $("#soundid").find('[value="up"]').get(0).selected = true;
            } else if (arrmode_m[4] == '清脆') {
                $("#soundid").find('[value="清脆"]').get(0).selected = true;
            }
        } else {
            $("#show_sounds").removeClass("c-on");
            $("#soundid").hide();
        }
    }
});
/*保存预警*/
$(".yj_save").live('click', (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee19() {
    var stockcode, stockname, clientInterface, pcid, mobileid, market, emMsg, mode, newvalue, pcc, modeay, modev, shakeI, paramName, paramValue;
    return _regenerator2.default.wrap(function _callee19$(_context19) {
        while (1) {
            switch (_context19.prev = _context19.next) {
                case 0:
                    stockcode = $(this).parent().parent().prev().attr('stockcode');
                    stockname = $(this).parent().parent().prev().attr('stockname');
                    clientInterface = new ComClientInterface({ 'stockcode': stockcode, 'stockname': stockname });
                    pcid = $(this).parent().parent().prev().attr('pcid');
                    mobileid = $(this).parent().parent().prev().attr('mobileid');
                    market = $(this).parent().parent().prev().attr('market');
                    emMsg = $(this).parent().parent().find('.list_tips');
                    mode = $(this).parent().parent().find(".yj_mode");
                    newvalue = $(this).parent().parent().prev().attr('value');

                    mode = mode.attr('arrmode_m');

                    pcc = 1;
                    modeay = [];
                    modev = mode.split(",");
                    _context19.next = 15;
                    return clientInterface.setDefaultAlertMode(mode);

                case 15:
                    shakeI = 0;

                    if (!(pcid != '')) {
                        _context19.next = 28;
                        break;
                    }

                    if (!($(emMsg).attr('view_valid_msg') == $(emMsg).html())) {
                        _context19.next = 25;
                        break;
                    }

                    paramName = $(emMsg).siblings('input').attr('param');
                    paramValue = $(emMsg).siblings('input').val();

                    if (paramValue != newvalue) {
                        if (modev[3] == 0) {
                            modev[3] = 1;
                        }
                        mode = modev.join(',');

                        clientInterface.formatSetSubData(paramName, paramValue, mode, market, pcid);
                    } else {
                        clientInterface.formatSetSubData(paramName, paramValue, mode, market, pcid);
                    }
                    _context19.next = 23;
                    return clientInterface.postSetSubData(pcc);

                case 23:
                    _context19.next = 26;
                    break;

                case 25:
                    if ($(emMsg).attr('view_empty_msg') == $(emMsg).html() || $(emMsg).attr('view_less_msg') == $(emMsg).html() || $(emMsg).attr('view_max_msg') == $(emMsg).html()) {
                        if (shakeI == 0) {
                            shake($(emMsg), 'shake', 1);
                            shakeI = 1;
                        }
                    }

                case 26:
                    _context19.next = 38;
                    break;

                case 28:
                    if (!(mobileid != '')) {
                        _context19.next = 38;
                        break;
                    }

                    if (!($(emMsg).attr('view_valid_msg') == $(emMsg).html())) {
                        _context19.next = 37;
                        break;
                    }

                    paramName = $(emMsg).siblings('input').attr('param');
                    paramValue = $(emMsg).siblings('input').val();

                    if (paramValue != newvalue) {
                        if (modev[3] == 0) {
                            modev[3] = 1;
                        }
                        mode = modev.join(',');

                        clientInterface.formatSetSubData(paramName, paramValue, mode, market, pcid, mobileid);
                    } else {
                        clientInterface.formatSetSubData(paramName, paramValue, mode, market, pcid, mobileid);
                    }
                    _context19.next = 35;
                    return clientInterface.postSetSubData(pcc);

                case 35:
                    _context19.next = 38;
                    break;

                case 37:
                    if ($(emMsg).attr('view_empty_msg') == $(emMsg).html() || $(emMsg).attr('view_less_msg') == $(emMsg).html() || $(emMsg).attr('view_max_msg') == $(emMsg).html()) {
                        if (shakeI == 0) {
                            shake($(emMsg), 'shake', 1);
                            shakeI = 1;
                        }
                    }

                case 38:
                case 'end':
                    return _context19.stop();
            }
        }
    }, _callee19, this);
})));
/**
 * @author COCO
 * @addTime 2017-05-11
 * 预警结果鼠标悬浮出现买卖图标
 */
$('#proTableResult').on({ 'mouseover': function mouseover(e) {
        toggleClass(e, 0);
    }, 'mouseout': function mouseout(e) {
        toggleClass(e, 1);
    } });

function toggleClass(e, flag) {
    e = e || window.event;
    var $target = $(e.target);
    var $closeTr = $target.closest('tr');
    if (flag) {
        $closeTr.find('.small-icon').addClass('hide');
    } else {
        $closeTr.find('.small-icon').removeClass('hide');
    }
}

function jumpBuy(e, flag) {

    e = e || window.event;
    var $target = $(e.target);
    var $closeTr = $target.closest('tr');
    var code = $closeTr.attr('stockcode');
    var market = $closeTr.attr('market');
    var type = 'NEW';

    getRequest(code, type, function () {
        var _ref20 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee20(data) {
            var newPrice, passport, account, userid, strInfo, util, xdMgr, cmd;
            return _regenerator2.default.wrap(function _callee20$(_context20) {
                while (1) {
                    switch (_context20.prev = _context20.next) {
                        case 0:
                            newPrice = data[code]['NEW'];
                            passport = new ThsPassport();
                            _context20.next = 4;
                            return passport.get('account');

                        case 4:
                            account = _context20.sent;
                            _context20.next = 7;
                            return passport.get('userid');

                        case 7:
                            userid = _context20.sent;
                            strInfo = '<?xml version="1.0" encoding="GB2312">' + '<RealTime uid="' + userid + '" StockCode="' + code + '" >' + '<Bid>' + '<Price Selected="1">' + newPrice + '</Price>' +
                            // '<Amount>95563</Amount>'+
                            '</Bid>' + '</RealTime>';
                            util = new ThsUtil();
                            _context20.next = 12;
                            return util.base64Encrypt(strInfo);

                        case 12:
                            _context20.t0 = _context20.sent;
                            strInfo = 'realtime=' + _context20.t0;

                            strInfo = 'wt_startup=wt_startup=\r\n' + strInfo;
                            xdMgr = external.createObject('XdMgr');
                            cmd = 'XD_MAIRU';

                            if (flag === 1) {
                                cmd = 'XD_MAICHU';
                            }
                            _context20.next = 20;
                            return xdMgr.fastCallXiadan({ 'cmd': cmd, 'code': code, 'info': strInfo, 'default': false, 'hide': false, 'select': false });

                        case 20:
                        case 'end':
                            return _context20.stop();
                    }
                }
            }, _callee20, this);
        }));

        return function (_x2) {
            return _ref20.apply(this, arguments);
        };
    }());
}

/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(36), __esModule: true };

/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(65);
__webpack_require__(67);
__webpack_require__(68);
__webpack_require__(66);
module.exports = __webpack_require__(4).Promise;

/***/ }),
/* 37 */
/***/ (function(module, exports) {

module.exports = function(){ /* empty */ };

/***/ }),
/* 38 */
/***/ (function(module, exports) {

module.exports = function(it, Constructor, name, forbiddenField){
  if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
    throw TypeError(name + ': incorrect invocation!');
  } return it;
};

/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {

// false -> Array#indexOf
// true  -> Array#includes
var toIObject = __webpack_require__(18)
  , toLength  = __webpack_require__(29)
  , toIndex   = __webpack_require__(60);
module.exports = function(IS_INCLUDES){
  return function($this, el, fromIndex){
    var O      = toIObject($this)
      , length = toLength(O.length)
      , index  = toIndex(fromIndex, length)
      , value;
    // Array#includes uses SameValueZero equality algorithm
    if(IS_INCLUDES && el != el)while(length > index){
      value = O[index++];
      if(value != value)return true;
    // Array#toIndex ignores holes, Array#includes - not
    } else for(;length > index; index++)if(IS_INCLUDES || index in O){
      if(O[index] === el)return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {

var ctx         = __webpack_require__(8)
  , call        = __webpack_require__(45)
  , isArrayIter = __webpack_require__(44)
  , anObject    = __webpack_require__(2)
  , toLength    = __webpack_require__(29)
  , getIterFn   = __webpack_require__(63)
  , BREAK       = {}
  , RETURN      = {};
var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
  var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
    , f      = ctx(fn, that, entries ? 2 : 1)
    , index  = 0
    , length, step, iterator, result;
  if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
  // fast case for arrays with default iterator
  if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
    result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
    if(result === BREAK || result === RETURN)return result;
  } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
    result = call(iterator, f, step.value, entries);
    if(result === BREAK || result === RETURN)return result;
  }
};
exports.BREAK  = BREAK;
exports.RETURN = RETURN;

/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = !__webpack_require__(5) && !__webpack_require__(22)(function(){
  return Object.defineProperty(__webpack_require__(14)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});

/***/ }),
/* 42 */
/***/ (function(module, exports) {

// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function(fn, args, that){
  var un = that === undefined;
  switch(args.length){
    case 0: return un ? fn()
                      : fn.call(that);
    case 1: return un ? fn(args[0])
                      : fn.call(that, args[0]);
    case 2: return un ? fn(args[0], args[1])
                      : fn.call(that, args[0], args[1]);
    case 3: return un ? fn(args[0], args[1], args[2])
                      : fn.call(that, args[0], args[1], args[2]);
    case 4: return un ? fn(args[0], args[1], args[2], args[3])
                      : fn.call(that, args[0], args[1], args[2], args[3]);
  } return              fn.apply(that, args);
};

/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {

// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(7);
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
  return cof(it) == 'String' ? it.split('') : Object(it);
};

/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {

// check on default Array iterator
var Iterators  = __webpack_require__(6)
  , ITERATOR   = __webpack_require__(0)('iterator')
  , ArrayProto = Array.prototype;

module.exports = function(it){
  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};

/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {

// call something on iterator step with safe closing on error
var anObject = __webpack_require__(2);
module.exports = function(iterator, fn, value, entries){
  try {
    return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch(e){
    var ret = iterator['return'];
    if(ret !== undefined)anObject(ret.call(iterator));
    throw e;
  }
};

/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var create         = __webpack_require__(50)
  , descriptor     = __webpack_require__(26)
  , setToStringTag = __webpack_require__(15)
  , IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(3)(IteratorPrototype, __webpack_require__(0)('iterator'), function(){ return this; });

module.exports = function(Constructor, NAME, next){
  Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
  setToStringTag(Constructor, NAME + ' Iterator');
};

/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {

var ITERATOR     = __webpack_require__(0)('iterator')
  , SAFE_CLOSING = false;

try {
  var riter = [7][ITERATOR]();
  riter['return'] = function(){ SAFE_CLOSING = true; };
  Array.from(riter, function(){ throw 2; });
} catch(e){ /* empty */ }

module.exports = function(exec, skipClosing){
  if(!skipClosing && !SAFE_CLOSING)return false;
  var safe = false;
  try {
    var arr  = [7]
      , iter = arr[ITERATOR]();
    iter.next = function(){ return {done: safe = true}; };
    arr[ITERATOR] = function(){ return iter; };
    exec(arr);
  } catch(e){ /* empty */ }
  return safe;
};

/***/ }),
/* 48 */
/***/ (function(module, exports) {

module.exports = function(done, value){
  return {value: value, done: !!done};
};

/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {

var global    = __webpack_require__(1)
  , macrotask = __webpack_require__(28).set
  , Observer  = global.MutationObserver || global.WebKitMutationObserver
  , process   = global.process
  , Promise   = global.Promise
  , isNode    = __webpack_require__(7)(process) == 'process';

module.exports = function(){
  var head, last, notify;

  var flush = function(){
    var parent, fn;
    if(isNode && (parent = process.domain))parent.exit();
    while(head){
      fn   = head.fn;
      head = head.next;
      try {
        fn();
      } catch(e){
        if(head)notify();
        else last = undefined;
        throw e;
      }
    } last = undefined;
    if(parent)parent.enter();
  };

  // Node.js
  if(isNode){
    notify = function(){
      process.nextTick(flush);
    };
  // browsers with MutationObserver
  } else if(Observer){
    var toggle = true
      , node   = document.createTextNode('');
    new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
    notify = function(){
      node.data = toggle = !toggle;
    };
  // environments with maybe non-completely correct, but existent Promise
  } else if(Promise && Promise.resolve){
    var promise = Promise.resolve();
    notify = function(){
      promise.then(flush);
    };
  // for other environments - macrotask based on:
  // - setImmediate
  // - MessageChannel
  // - window.postMessag
  // - onreadystatechange
  // - setTimeout
  } else {
    notify = function(){
      // strange IE + webpack dev server bug - use .call(global)
      macrotask.call(global, flush);
    };
  }

  return function(fn){
    var task = {fn: fn, next: undefined};
    if(last)last.next = task;
    if(!head){
      head = task;
      notify();
    } last = task;
  };
};

/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject    = __webpack_require__(2)
  , dPs         = __webpack_require__(51)
  , enumBugKeys = __webpack_require__(20)
  , IE_PROTO    = __webpack_require__(16)('IE_PROTO')
  , Empty       = function(){ /* empty */ }
  , PROTOTYPE   = 'prototype';

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function(){
  // Thrash, waste and sodomy: IE GC bug
  var iframe = __webpack_require__(14)('iframe')
    , i      = enumBugKeys.length
    , lt     = '<'
    , gt     = '>'
    , iframeDocument;
  iframe.style.display = 'none';
  __webpack_require__(23).appendChild(iframe);
  iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  // createDict = iframe.contentWindow.Object;
  // html.removeChild(iframe);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  iframeDocument.close();
  createDict = iframeDocument.F;
  while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
  return createDict();
};

module.exports = Object.create || function create(O, Properties){
  var result;
  if(O !== null){
    Empty[PROTOTYPE] = anObject(O);
    result = new Empty;
    Empty[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = createDict();
  return Properties === undefined ? result : dPs(result, Properties);
};


/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {

var dP       = __webpack_require__(11)
  , anObject = __webpack_require__(2)
  , getKeys  = __webpack_require__(54);

module.exports = __webpack_require__(5) ? Object.defineProperties : function defineProperties(O, Properties){
  anObject(O);
  var keys   = getKeys(Properties)
    , length = keys.length
    , i = 0
    , P;
  while(length > i)dP.f(O, P = keys[i++], Properties[P]);
  return O;
};

/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has         = __webpack_require__(9)
  , toObject    = __webpack_require__(61)
  , IE_PROTO    = __webpack_require__(16)('IE_PROTO')
  , ObjectProto = Object.prototype;

module.exports = Object.getPrototypeOf || function(O){
  O = toObject(O);
  if(has(O, IE_PROTO))return O[IE_PROTO];
  if(typeof O.constructor == 'function' && O instanceof O.constructor){
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectProto : null;
};

/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {

var has          = __webpack_require__(9)
  , toIObject    = __webpack_require__(18)
  , arrayIndexOf = __webpack_require__(39)(false)
  , IE_PROTO     = __webpack_require__(16)('IE_PROTO');

module.exports = function(object, names){
  var O      = toIObject(object)
    , i      = 0
    , result = []
    , key;
  for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while(names.length > i)if(has(O, key = names[i++])){
    ~arrayIndexOf(result, key) || result.push(key);
  }
  return result;
};

/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys       = __webpack_require__(53)
  , enumBugKeys = __webpack_require__(20);

module.exports = Object.keys || function keys(O){
  return $keys(O, enumBugKeys);
};

/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {

var hide = __webpack_require__(3);
module.exports = function(target, src, safe){
  for(var key in src){
    if(safe && target[key])target[key] = src[key];
    else hide(target, key, src[key]);
  } return target;
};

/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(3);

/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var global      = __webpack_require__(1)
  , core        = __webpack_require__(4)
  , dP          = __webpack_require__(11)
  , DESCRIPTORS = __webpack_require__(5)
  , SPECIES     = __webpack_require__(0)('species');

module.exports = function(KEY){
  var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
  if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
    configurable: true,
    get: function(){ return this; }
  });
};

/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {

// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject  = __webpack_require__(2)
  , aFunction = __webpack_require__(12)
  , SPECIES   = __webpack_require__(0)('species');
module.exports = function(O, D){
  var C = anObject(O).constructor, S;
  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};

/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(17)
  , defined   = __webpack_require__(13);
// true  -> String#at
// false -> String#codePointAt
module.exports = function(TO_STRING){
  return function(that, pos){
    var s = String(defined(that))
      , i = toInteger(pos)
      , l = s.length
      , a, b;
    if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
    a = s.charCodeAt(i);
    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
      ? TO_STRING ? s.charAt(i) : a
      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  };
};

/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(17)
  , max       = Math.max
  , min       = Math.min;
module.exports = function(index, length){
  index = toInteger(index);
  return index < 0 ? max(index + length, 0) : min(index, length);
};

/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.13 ToObject(argument)
var defined = __webpack_require__(13);
module.exports = function(it){
  return Object(defined(it));
};

/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(10);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S){
  if(!isObject(it))return it;
  var fn, val;
  if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
  if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
  if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
  throw TypeError("Can't convert object to primitive value");
};

/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {

var classof   = __webpack_require__(19)
  , ITERATOR  = __webpack_require__(0)('iterator')
  , Iterators = __webpack_require__(6);
module.exports = __webpack_require__(4).getIteratorMethod = function(it){
  if(it != undefined)return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};

/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var addToUnscopables = __webpack_require__(37)
  , step             = __webpack_require__(48)
  , Iterators        = __webpack_require__(6)
  , toIObject        = __webpack_require__(18);

// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(24)(Array, 'Array', function(iterated, kind){
  this._t = toIObject(iterated); // target
  this._i = 0;                   // next index
  this._k = kind;                // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function(){
  var O     = this._t
    , kind  = this._k
    , index = this._i++;
  if(!O || index >= O.length){
    this._t = undefined;
    return step(1);
  }
  if(kind == 'keys'  )return step(0, index);
  if(kind == 'values')return step(0, O[index]);
  return step(0, [index, O[index]]);
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;

addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');

/***/ }),
/* 65 */
/***/ (function(module, exports) {



/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var LIBRARY            = __webpack_require__(25)
  , global             = __webpack_require__(1)
  , ctx                = __webpack_require__(8)
  , classof            = __webpack_require__(19)
  , $export            = __webpack_require__(21)
  , isObject           = __webpack_require__(10)
  , aFunction          = __webpack_require__(12)
  , anInstance         = __webpack_require__(38)
  , forOf              = __webpack_require__(40)
  , speciesConstructor = __webpack_require__(58)
  , task               = __webpack_require__(28).set
  , microtask          = __webpack_require__(49)()
  , PROMISE            = 'Promise'
  , TypeError          = global.TypeError
  , process            = global.process
  , $Promise           = global[PROMISE]
  , process            = global.process
  , isNode             = classof(process) == 'process'
  , empty              = function(){ /* empty */ }
  , Internal, GenericPromiseCapability, Wrapper;

var USE_NATIVE = !!function(){
  try {
    // correct subclassing with @@species support
    var promise     = $Promise.resolve(1)
      , FakePromise = (promise.constructor = {})[__webpack_require__(0)('species')] = function(exec){ exec(empty, empty); };
    // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
    return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
  } catch(e){ /* empty */ }
}();

// helpers
var sameConstructor = function(a, b){
  // with library wrapper special case
  return a === b || a === $Promise && b === Wrapper;
};
var isThenable = function(it){
  var then;
  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var newPromiseCapability = function(C){
  return sameConstructor($Promise, C)
    ? new PromiseCapability(C)
    : new GenericPromiseCapability(C);
};
var PromiseCapability = GenericPromiseCapability = function(C){
  var resolve, reject;
  this.promise = new C(function($$resolve, $$reject){
    if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
    resolve = $$resolve;
    reject  = $$reject;
  });
  this.resolve = aFunction(resolve);
  this.reject  = aFunction(reject);
};
var perform = function(exec){
  try {
    exec();
  } catch(e){
    return {error: e};
  }
};
var notify = function(promise, isReject){
  if(promise._n)return;
  promise._n = true;
  var chain = promise._c;
  microtask(function(){
    var value = promise._v
      , ok    = promise._s == 1
      , i     = 0;
    var run = function(reaction){
      var handler = ok ? reaction.ok : reaction.fail
        , resolve = reaction.resolve
        , reject  = reaction.reject
        , domain  = reaction.domain
        , result, then;
      try {
        if(handler){
          if(!ok){
            if(promise._h == 2)onHandleUnhandled(promise);
            promise._h = 1;
          }
          if(handler === true)result = value;
          else {
            if(domain)domain.enter();
            result = handler(value);
            if(domain)domain.exit();
          }
          if(result === reaction.promise){
            reject(TypeError('Promise-chain cycle'));
          } else if(then = isThenable(result)){
            then.call(result, resolve, reject);
          } else resolve(result);
        } else reject(value);
      } catch(e){
        reject(e);
      }
    };
    while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
    promise._c = [];
    promise._n = false;
    if(isReject && !promise._h)onUnhandled(promise);
  });
};
var onUnhandled = function(promise){
  task.call(global, function(){
    var value = promise._v
      , abrupt, handler, console;
    if(isUnhandled(promise)){
      abrupt = perform(function(){
        if(isNode){
          process.emit('unhandledRejection', value, promise);
        } else if(handler = global.onunhandledrejection){
          handler({promise: promise, reason: value});
        } else if((console = global.console) && console.error){
          console.error('Unhandled promise rejection', value);
        }
      });
      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
      promise._h = isNode || isUnhandled(promise) ? 2 : 1;
    } promise._a = undefined;
    if(abrupt)throw abrupt.error;
  });
};
var isUnhandled = function(promise){
  if(promise._h == 1)return false;
  var chain = promise._a || promise._c
    , i     = 0
    , reaction;
  while(chain.length > i){
    reaction = chain[i++];
    if(reaction.fail || !isUnhandled(reaction.promise))return false;
  } return true;
};
var onHandleUnhandled = function(promise){
  task.call(global, function(){
    var handler;
    if(isNode){
      process.emit('rejectionHandled', promise);
    } else if(handler = global.onrejectionhandled){
      handler({promise: promise, reason: promise._v});
    }
  });
};
var $reject = function(value){
  var promise = this;
  if(promise._d)return;
  promise._d = true;
  promise = promise._w || promise; // unwrap
  promise._v = value;
  promise._s = 2;
  if(!promise._a)promise._a = promise._c.slice();
  notify(promise, true);
};
var $resolve = function(value){
  var promise = this
    , then;
  if(promise._d)return;
  promise._d = true;
  promise = promise._w || promise; // unwrap
  try {
    if(promise === value)throw TypeError("Promise can't be resolved itself");
    if(then = isThenable(value)){
      microtask(function(){
        var wrapper = {_w: promise, _d: false}; // wrap
        try {
          then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
        } catch(e){
          $reject.call(wrapper, e);
        }
      });
    } else {
      promise._v = value;
      promise._s = 1;
      notify(promise, false);
    }
  } catch(e){
    $reject.call({_w: promise, _d: false}, e); // wrap
  }
};

// constructor polyfill
if(!USE_NATIVE){
  // 25.4.3.1 Promise(executor)
  $Promise = function Promise(executor){
    anInstance(this, $Promise, PROMISE, '_h');
    aFunction(executor);
    Internal.call(this);
    try {
      executor(ctx($resolve, this, 1), ctx($reject, this, 1));
    } catch(err){
      $reject.call(this, err);
    }
  };
  Internal = function Promise(executor){
    this._c = [];             // <- awaiting reactions
    this._a = undefined;      // <- checked in isUnhandled reactions
    this._s = 0;              // <- state
    this._d = false;          // <- done
    this._v = undefined;      // <- value
    this._h = 0;              // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
    this._n = false;          // <- notify
  };
  Internal.prototype = __webpack_require__(55)($Promise.prototype, {
    // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
    then: function then(onFulfilled, onRejected){
      var reaction    = newPromiseCapability(speciesConstructor(this, $Promise));
      reaction.ok     = typeof onFulfilled == 'function' ? onFulfilled : true;
      reaction.fail   = typeof onRejected == 'function' && onRejected;
      reaction.domain = isNode ? process.domain : undefined;
      this._c.push(reaction);
      if(this._a)this._a.push(reaction);
      if(this._s)notify(this, false);
      return reaction.promise;
    },
    // 25.4.5.1 Promise.prototype.catch(onRejected)
    'catch': function(onRejected){
      return this.then(undefined, onRejected);
    }
  });
  PromiseCapability = function(){
    var promise  = new Internal;
    this.promise = promise;
    this.resolve = ctx($resolve, promise, 1);
    this.reject  = ctx($reject, promise, 1);
  };
}

$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
__webpack_require__(15)($Promise, PROMISE);
__webpack_require__(57)(PROMISE);
Wrapper = __webpack_require__(4)[PROMISE];

// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
  // 25.4.4.5 Promise.reject(r)
  reject: function reject(r){
    var capability = newPromiseCapability(this)
      , $$reject   = capability.reject;
    $$reject(r);
    return capability.promise;
  }
});
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
  // 25.4.4.6 Promise.resolve(x)
  resolve: function resolve(x){
    // instanceof instead of internal slot check because we should fix it without replacement native Promise core
    if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
    var capability = newPromiseCapability(this)
      , $$resolve  = capability.resolve;
    $$resolve(x);
    return capability.promise;
  }
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(47)(function(iter){
  $Promise.all(iter)['catch'](empty);
})), PROMISE, {
  // 25.4.4.1 Promise.all(iterable)
  all: function all(iterable){
    var C          = this
      , capability = newPromiseCapability(C)
      , resolve    = capability.resolve
      , reject     = capability.reject;
    var abrupt = perform(function(){
      var values    = []
        , index     = 0
        , remaining = 1;
      forOf(iterable, false, function(promise){
        var $index        = index++
          , alreadyCalled = false;
        values.push(undefined);
        remaining++;
        C.resolve(promise).then(function(value){
          if(alreadyCalled)return;
          alreadyCalled  = true;
          values[$index] = value;
          --remaining || resolve(values);
        }, reject);
      });
      --remaining || resolve(values);
    });
    if(abrupt)reject(abrupt.error);
    return capability.promise;
  },
  // 25.4.4.4 Promise.race(iterable)
  race: function race(iterable){
    var C          = this
      , capability = newPromiseCapability(C)
      , reject     = capability.reject;
    var abrupt = perform(function(){
      forOf(iterable, false, function(promise){
        C.resolve(promise).then(capability.resolve, reject);
      });
    });
    if(abrupt)reject(abrupt.error);
    return capability.promise;
  }
});

/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $at  = __webpack_require__(59)(true);

// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(24)(String, 'String', function(iterated){
  this._t = String(iterated); // target
  this._i = 0;                // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function(){
  var O     = this._t
    , index = this._i
    , point;
  if(index >= O.length)return {value: undefined, done: true};
  point = $at(O, index);
  this._i += point.length;
  return {value: point, done: false};
});

/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(64);
var global        = __webpack_require__(1)
  , hide          = __webpack_require__(3)
  , Iterators     = __webpack_require__(6)
  , TO_STRING_TAG = __webpack_require__(0)('toStringTag');

for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
  var NAME       = collections[i]
    , Collection = global[NAME]
    , proto      = Collection && Collection.prototype;
  if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
  Iterators[NAME] = Iterators.Array;
}

/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be
// kept identical to the way it is obtained in runtime.js
var g =
  typeof global === "object" ? global :
  typeof window === "object" ? window :
  typeof self === "object" ? self : this;

// Use `getOwnPropertyNames` because not all browsers support calling
// `hasOwnProperty` on the global `self` object in a worker. See #183.
var hadRuntime = g.regeneratorRuntime &&
  Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;

// Save the old regeneratorRuntime in case it needs to be restored later.
var oldRuntime = hadRuntime && g.regeneratorRuntime;

// Force reevalutation of runtime.js.
g.regeneratorRuntime = undefined;

module.exports = __webpack_require__(70);

if (hadRuntime) {
  // Restore the original runtime.
  g.regeneratorRuntime = oldRuntime;
} else {
  // Remove the global property added by runtime.js.
  try {
    delete g.regeneratorRuntime;
  } catch(e) {
    g.regeneratorRuntime = undefined;
  }
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31)))

/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {/**
 * Copyright (c) 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
 * additional grant of patent rights can be found in the PATENTS file in
 * the same directory.
 */

!(function(global) {
  "use strict";

  var Op = Object.prototype;
  var hasOwn = Op.hasOwnProperty;
  var undefined; // More compressible than void 0.
  var $Symbol = typeof Symbol === "function" ? Symbol : {};
  var iteratorSymbol = $Symbol.iterator || "@@iterator";
  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";

  var inModule = typeof module === "object";
  var runtime = global.regeneratorRuntime;
  if (runtime) {
    if (inModule) {
      // If regeneratorRuntime is defined globally and we're in a module,
      // make the exports object identical to regeneratorRuntime.
      module.exports = runtime;
    }
    // Don't bother evaluating the rest of this file if the runtime was
    // already defined globally.
    return;
  }

  // Define the runtime globally (as expected by generated code) as either
  // module.exports (if we're in a module) or a new, empty object.
  runtime = global.regeneratorRuntime = inModule ? module.exports : {};

  function wrap(innerFn, outerFn, self, tryLocsList) {
    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
    var generator = Object.create(protoGenerator.prototype);
    var context = new Context(tryLocsList || []);

    // The ._invoke method unifies the implementations of the .next,
    // .throw, and .return methods.
    generator._invoke = makeInvokeMethod(innerFn, self, context);

    return generator;
  }
  runtime.wrap = wrap;

  // Try/catch helper to minimize deoptimizations. Returns a completion
  // record like context.tryEntries[i].completion. This interface could
  // have been (and was previously) designed to take a closure to be
  // invoked without arguments, but in all the cases we care about we
  // already have an existing method we want to call, so there's no need
  // to create a new function object. We can even get away with assuming
  // the method takes exactly one argument, since that happens to be true
  // in every case, so we don't have to touch the arguments object. The
  // only additional allocation required is the completion record, which
  // has a stable shape and so hopefully should be cheap to allocate.
  function tryCatch(fn, obj, arg) {
    try {
      return { type: "normal", arg: fn.call(obj, arg) };
    } catch (err) {
      return { type: "throw", arg: err };
    }
  }

  var GenStateSuspendedStart = "suspendedStart";
  var GenStateSuspendedYield = "suspendedYield";
  var GenStateExecuting = "executing";
  var GenStateCompleted = "completed";

  // Returning this object from the innerFn has the same effect as
  // breaking out of the dispatch switch statement.
  var ContinueSentinel = {};

  // Dummy constructor functions that we use as the .constructor and
  // .constructor.prototype properties for functions that return Generator
  // objects. For full spec compliance, you may wish to configure your
  // minifier not to mangle the names of these two functions.
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}

  // This is a polyfill for %IteratorPrototype% for environments that
  // don't natively support it.
  var IteratorPrototype = {};
  IteratorPrototype[iteratorSymbol] = function () {
    return this;
  };

  var getProto = Object.getPrototypeOf;
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  if (NativeIteratorPrototype &&
      NativeIteratorPrototype !== Op &&
      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
    // This environment has a native %IteratorPrototype%; use it instead
    // of the polyfill.
    IteratorPrototype = NativeIteratorPrototype;
  }

  var Gp = GeneratorFunctionPrototype.prototype =
    Generator.prototype = Object.create(IteratorPrototype);
  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  GeneratorFunctionPrototype.constructor = GeneratorFunction;
  GeneratorFunctionPrototype[toStringTagSymbol] =
    GeneratorFunction.displayName = "GeneratorFunction";

  // Helper for defining the .next, .throw, and .return methods of the
  // Iterator interface in terms of a single ._invoke method.
  function defineIteratorMethods(prototype) {
    ["next", "throw", "return"].forEach(function(method) {
      prototype[method] = function(arg) {
        return this._invoke(method, arg);
      };
    });
  }

  runtime.isGeneratorFunction = function(genFun) {
    var ctor = typeof genFun === "function" && genFun.constructor;
    return ctor
      ? ctor === GeneratorFunction ||
        // For the native GeneratorFunction constructor, the best we can
        // do is to check its .name property.
        (ctor.displayName || ctor.name) === "GeneratorFunction"
      : false;
  };

  runtime.mark = function(genFun) {
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
    } else {
      genFun.__proto__ = GeneratorFunctionPrototype;
      if (!(toStringTagSymbol in genFun)) {
        genFun[toStringTagSymbol] = "GeneratorFunction";
      }
    }
    genFun.prototype = Object.create(Gp);
    return genFun;
  };

  // Within the body of any async function, `await x` is transformed to
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
  // meant to be awaited.
  runtime.awrap = function(arg) {
    return { __await: arg };
  };

  function AsyncIterator(generator) {
    function invoke(method, arg, resolve, reject) {
      var record = tryCatch(generator[method], generator, arg);
      if (record.type === "throw") {
        reject(record.arg);
      } else {
        var result = record.arg;
        var value = result.value;
        if (value &&
            typeof value === "object" &&
            hasOwn.call(value, "__await")) {
          return Promise.resolve(value.__await).then(function(value) {
            invoke("next", value, resolve, reject);
          }, function(err) {
            invoke("throw", err, resolve, reject);
          });
        }

        return Promise.resolve(value).then(function(unwrapped) {
          // When a yielded Promise is resolved, its final value becomes
          // the .value of the Promise<{value,done}> result for the
          // current iteration. If the Promise is rejected, however, the
          // result for this iteration will be rejected with the same
          // reason. Note that rejections of yielded Promises are not
          // thrown back into the generator function, as is the case
          // when an awaited Promise is rejected. This difference in
          // behavior between yield and await is important, because it
          // allows the consumer to decide what to do with the yielded
          // rejection (swallow it and continue, manually .throw it back
          // into the generator, abandon iteration, whatever). With
          // await, by contrast, there is no opportunity to examine the
          // rejection reason outside the generator function, so the
          // only option is to throw it from the await expression, and
          // let the generator function handle the exception.
          result.value = unwrapped;
          resolve(result);
        }, reject);
      }
    }

    if (typeof global.process === "object" && global.process.domain) {
      invoke = global.process.domain.bind(invoke);
    }

    var previousPromise;

    function enqueue(method, arg) {
      function callInvokeWithMethodAndArg() {
        return new Promise(function(resolve, reject) {
          invoke(method, arg, resolve, reject);
        });
      }

      return previousPromise =
        // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        previousPromise ? previousPromise.then(
          callInvokeWithMethodAndArg,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          callInvokeWithMethodAndArg
        ) : callInvokeWithMethodAndArg();
    }

    // Define the unified helper method that is used to implement .next,
    // .throw, and .return (see defineIteratorMethods).
    this._invoke = enqueue;
  }

  defineIteratorMethods(AsyncIterator.prototype);
  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
    return this;
  };
  runtime.AsyncIterator = AsyncIterator;

  // Note that simple async functions are implemented on top of
  // AsyncIterator objects; they just return a Promise for the value of
  // the final result produced by the iterator.
  runtime.async = function(innerFn, outerFn, self, tryLocsList) {
    var iter = new AsyncIterator(
      wrap(innerFn, outerFn, self, tryLocsList)
    );

    return runtime.isGeneratorFunction(outerFn)
      ? iter // If outerFn is a generator, return the full iterator.
      : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
  };

  function makeInvokeMethod(innerFn, self, context) {
    var state = GenStateSuspendedStart;

    return function invoke(method, arg) {
      if (state === GenStateExecuting) {
        throw new Error("Generator is already running");
      }

      if (state === GenStateCompleted) {
        if (method === "throw") {
          throw arg;
        }

        // Be forgiving, per 25.3.3.3.3 of the spec:
        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
        return doneResult();
      }

      context.method = method;
      context.arg = arg;

      while (true) {
        var delegate = context.delegate;
        if (delegate) {
          var delegateResult = maybeInvokeDelegate(delegate, context);
          if (delegateResult) {
            if (delegateResult === ContinueSentinel) continue;
            return delegateResult;
          }
        }

        if (context.method === "next") {
          // Setting context._sent for legacy support of Babel's
          // function.sent implementation.
          context.sent = context._sent = context.arg;

        } else if (context.method === "throw") {
          if (state === GenStateSuspendedStart) {
            state = GenStateCompleted;
            throw context.arg;
          }

          context.dispatchException(context.arg);

        } else if (context.method === "return") {
          context.abrupt("return", context.arg);
        }

        state = GenStateExecuting;

        var record = tryCatch(innerFn, self, context);
        if (record.type === "normal") {
          // If an exception is thrown from innerFn, we leave state ===
          // GenStateExecuting and loop back for another invocation.
          state = context.done
            ? GenStateCompleted
            : GenStateSuspendedYield;

          if (record.arg === ContinueSentinel) {
            continue;
          }

          return {
            value: record.arg,
            done: context.done
          };

        } else if (record.type === "throw") {
          state = GenStateCompleted;
          // Dispatch the exception by looping back around to the
          // context.dispatchException(context.arg) call above.
          context.method = "throw";
          context.arg = record.arg;
        }
      }
    };
  }

  // Call delegate.iterator[context.method](context.arg) and handle the
  // result, either by returning a { value, done } result from the
  // delegate iterator, or by modifying context.method and context.arg,
  // setting context.delegate to null, and returning the ContinueSentinel.
  function maybeInvokeDelegate(delegate, context) {
    var method = delegate.iterator[context.method];
    if (method === undefined) {
      // A .throw or .return when the delegate iterator has no .throw
      // method always terminates the yield* loop.
      context.delegate = null;

      if (context.method === "throw") {
        if (delegate.iterator.return) {
          // If the delegate iterator has a return method, give it a
          // chance to clean up.
          context.method = "return";
          context.arg = undefined;
          maybeInvokeDelegate(delegate, context);

          if (context.method === "throw") {
            // If maybeInvokeDelegate(context) changed context.method from
            // "return" to "throw", let that override the TypeError below.
            return ContinueSentinel;
          }
        }

        context.method = "throw";
        context.arg = new TypeError(
          "The iterator does not provide a 'throw' method");
      }

      return ContinueSentinel;
    }

    var record = tryCatch(method, delegate.iterator, context.arg);

    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }

    var info = record.arg;

    if (! info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }

    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value;

      // Resume execution at the desired location (see delegateYield).
      context.next = delegate.nextLoc;

      // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined;
      }

    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    }

    // The delegate iterator is finished, so forget it and continue with
    // the outer generator.
    context.delegate = null;
    return ContinueSentinel;
  }

  // Define Generator.prototype.{next,throw,return} in terms of the
  // unified ._invoke helper method.
  defineIteratorMethods(Gp);

  Gp[toStringTagSymbol] = "Generator";

  // A Generator should always return itself as the iterator object when the
  // @@iterator function is called on it. Some browsers' implementations of the
  // iterator prototype chain incorrectly implement this, causing the Generator
  // object to not be returned from this call. This ensures that doesn't happen.
  // See https://github.com/facebook/regenerator/issues/274 for more details.
  Gp[iteratorSymbol] = function() {
    return this;
  };

  Gp.toString = function() {
    return "[object Generator]";
  };

  function pushTryEntry(locs) {
    var entry = { tryLoc: locs[0] };

    if (1 in locs) {
      entry.catchLoc = locs[1];
    }

    if (2 in locs) {
      entry.finallyLoc = locs[2];
      entry.afterLoc = locs[3];
    }

    this.tryEntries.push(entry);
  }

  function resetTryEntry(entry) {
    var record = entry.completion || {};
    record.type = "normal";
    delete record.arg;
    entry.completion = record;
  }

  function Context(tryLocsList) {
    // The root entry object (effectively a try statement without a catch
    // or a finally block) gives us a place to store values thrown from
    // locations where there is no enclosing try statement.
    this.tryEntries = [{ tryLoc: "root" }];
    tryLocsList.forEach(pushTryEntry, this);
    this.reset(true);
  }

  runtime.keys = function(object) {
    var keys = [];
    for (var key in object) {
      keys.push(key);
    }
    keys.reverse();

    // Rather than returning an object with a next method, we keep
    // things simple and return the next function itself.
    return function next() {
      while (keys.length) {
        var key = keys.pop();
        if (key in object) {
          next.value = key;
          next.done = false;
          return next;
        }
      }

      // To avoid creating an additional object, we just hang the .value
      // and .done properties off the next function object itself. This
      // also ensures that the minifier will not anonymize the function.
      next.done = true;
      return next;
    };
  };

  function values(iterable) {
    if (iterable) {
      var iteratorMethod = iterable[iteratorSymbol];
      if (iteratorMethod) {
        return iteratorMethod.call(iterable);
      }

      if (typeof iterable.next === "function") {
        return iterable;
      }

      if (!isNaN(iterable.length)) {
        var i = -1, next = function next() {
          while (++i < iterable.length) {
            if (hasOwn.call(iterable, i)) {
              next.value = iterable[i];
              next.done = false;
              return next;
            }
          }

          next.value = undefined;
          next.done = true;

          return next;
        };

        return next.next = next;
      }
    }

    // Return an iterator with no values.
    return { next: doneResult };
  }
  runtime.values = values;

  function doneResult() {
    return { value: undefined, done: true };
  }

  Context.prototype = {
    constructor: Context,

    reset: function(skipTempReset) {
      this.prev = 0;
      this.next = 0;
      // Resetting context._sent for legacy support of Babel's
      // function.sent implementation.
      this.sent = this._sent = undefined;
      this.done = false;
      this.delegate = null;

      this.method = "next";
      this.arg = undefined;

      this.tryEntries.forEach(resetTryEntry);

      if (!skipTempReset) {
        for (var name in this) {
          // Not sure about the optimal order of these conditions:
          if (name.charAt(0) === "t" &&
              hasOwn.call(this, name) &&
              !isNaN(+name.slice(1))) {
            this[name] = undefined;
          }
        }
      }
    },

    stop: function() {
      this.done = true;

      var rootEntry = this.tryEntries[0];
      var rootRecord = rootEntry.completion;
      if (rootRecord.type === "throw") {
        throw rootRecord.arg;
      }

      return this.rval;
    },

    dispatchException: function(exception) {
      if (this.done) {
        throw exception;
      }

      var context = this;
      function handle(loc, caught) {
        record.type = "throw";
        record.arg = exception;
        context.next = loc;

        if (caught) {
          // If the dispatched exception was caught by a catch block,
          // then let that catch block handle the exception normally.
          context.method = "next";
          context.arg = undefined;
        }

        return !! caught;
      }

      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        var record = entry.completion;

        if (entry.tryLoc === "root") {
          // Exception thrown outside of any try block that could handle
          // it, so set the completion value of the entire function to
          // throw the exception.
          return handle("end");
        }

        if (entry.tryLoc <= this.prev) {
          var hasCatch = hasOwn.call(entry, "catchLoc");
          var hasFinally = hasOwn.call(entry, "finallyLoc");

          if (hasCatch && hasFinally) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            } else if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else if (hasCatch) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            }

          } else if (hasFinally) {
            if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else {
            throw new Error("try statement without catch or finally");
          }
        }
      }
    },

    abrupt: function(type, arg) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc <= this.prev &&
            hasOwn.call(entry, "finallyLoc") &&
            this.prev < entry.finallyLoc) {
          var finallyEntry = entry;
          break;
        }
      }

      if (finallyEntry &&
          (type === "break" ||
           type === "continue") &&
          finallyEntry.tryLoc <= arg &&
          arg <= finallyEntry.finallyLoc) {
        // Ignore the finally entry if control is not jumping to a
        // location outside the try/catch block.
        finallyEntry = null;
      }

      var record = finallyEntry ? finallyEntry.completion : {};
      record.type = type;
      record.arg = arg;

      if (finallyEntry) {
        this.method = "next";
        this.next = finallyEntry.finallyLoc;
        return ContinueSentinel;
      }

      return this.complete(record);
    },

    complete: function(record, afterLoc) {
      if (record.type === "throw") {
        throw record.arg;
      }

      if (record.type === "break" ||
          record.type === "continue") {
        this.next = record.arg;
      } else if (record.type === "return") {
        this.rval = this.arg = record.arg;
        this.method = "return";
        this.next = "end";
      } else if (record.type === "normal" && afterLoc) {
        this.next = afterLoc;
      }

      return ContinueSentinel;
    },

    finish: function(finallyLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.finallyLoc === finallyLoc) {
          this.complete(entry.completion, entry.afterLoc);
          resetTryEntry(entry);
          return ContinueSentinel;
        }
      }
    },

    "catch": function(tryLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc === tryLoc) {
          var record = entry.completion;
          if (record.type === "throw") {
            var thrown = record.arg;
            resetTryEntry(entry);
          }
          return thrown;
        }
      }

      // The context.catch method must only be called with a location
      // argument that corresponds to a known catch block.
      throw new Error("illegal catch attempt");
    },

    delegateYield: function(iterable, resultName, nextLoc) {
      this.delegate = {
        iterator: values(iterable),
        resultName: resultName,
        nextLoc: nextLoc
      };

      if (this.method === "next") {
        // Deliberately forget the last sent value so that we don't
        // accidentally pass it on to the delegate.
        this.arg = undefined;
      }

      return ContinueSentinel;
    }
  };
})(
  // Among the various tricks for obtaining a reference to the global
  // object, this seems to be the most reliable technique that does not
  // use indirect eval (which violates Content Security Policy).
  typeof global === "object" ? global :
  typeof window === "object" ? window :
  typeof self === "object" ? self : this
);

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(31)))

/***/ })
/******/ ]);